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
Per GOOS=linux golangci-lint run --no-config ./...:
pkg/chunked/dump/dump.go:154:15: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
if _, err := fmt.Fprintf(out, escapedOptional(payload, ESCAPE_LONE_DASH)); err != nil {
^
pkg/chunked/dump/dump.go:168:15: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
if _, err := fmt.Fprintf(out, escapedOptional(digest, ESCAPE_LONE_DASH)); err != nil {
and there may be more. Shouldn’t this use Fprintf("%s"), or some kind of Write, so that % characters are not interpreted?
replace Fprintf(file, string) with Fprint(file, string) since
the argument is a raw string and it should not be treated as a
formatting directive.
Closes: containers#1955
Signed-off-by: Giuseppe Scrivano <[email protected]>
Per
GOOS=linux golangci-lint run --no-config ./...
:and there may be more. Shouldn’t this use
Fprintf("%s")
, or some kind ofWrite
, so that%
characters are not interpreted?Cc: @giuseppe
[One of these days I’m going to make a non-consensus decision on #1579 …]
The text was updated successfully, but these errors were encountered: