Format Strings outside Printf
If you declare format strings for Printf
-style functions outside a stringliteral, make them const
values.
This helps go vet
perform static analysis of the format string.
Bad | Good |
---|---|
|
|
If you declare format strings for Printf
-style functions outside a stringliteral, make them const
values.
This helps go vet
perform static analysis of the format string.
Bad | Good |
---|---|
|
|
本文档使用 BookStack 构建