You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat a.go
package main
import "nosuchpkg"
var format = "%s %s"
var _ = nosuchpkg.Sprintf(format, "a", "b")
$ vet ~/a.go
/usr/local/google/home/adonovan/a.go:6: no formatting directive in Sprintf call
The printf check issues a spurious error when type information for an imported printf-like function is not available. Without the function's type signature, the checker heuristically assumes that the first string constant is the format string, such as "a" in the example above.
The text was updated successfully, but these errors were encountered:
The
printf
check issues a spurious error when type information for an imported printf-like function is not available. Without the function's type signature, the checker heuristically assumes that the first string constant is the format string, such as"a"
in the example above.The text was updated successfully, but these errors were encountered: