Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 756 Bytes

printf-name.md

File metadata and controls

22 lines (15 loc) · 756 Bytes

Naming Printf-style Functions

When you declare a Printf-style function, make sure that go vet can detect it and check the format string.

This means that you should use predefined Printf-style function names if possible. go vet will check these by default. See Printf family for more information.

If using the predefined names is not an option, end the name you choose with f: Wrapf, not Wrap. go vet can be asked to check specific Printf-style names but they must end with f.

go vet -printfuncs=wrapf,statusf

See also go vet: Printf family check.