Skip to content

chunked format string issues? #1955

Closed

Description

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?

Cc: @giuseppe

[One of these days I’m going to make a non-consensus decision on #1579 …]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions