Skip to content

Conversation

@chrisd8088
Copy link
Member

The go vet -printf ./... command, when run with Go 1.24 (and a matching Go version number in the go.mod file), now detects format strings that are not constants, as described in golang/go#60529.

We have one such non-constant format string in the newToken() function of the netrc package, so we adjust it now to use a standard format string with a specifier verb.

This issue was reported as part of git-lfs/git-lfs#5968.

The "go vet -printf ./..." command, when run with Go 1.24 (and a matching
Go version number in the "go.mod" file), now detects format strings that
are not constants, as described in golang/go#60529.

We have one such non-constant format string in the newToken() function
of the "netrc" package, so we adjust it now to use a standard format
string with a specifier verb.  This issue was reported in:

  git-lfs/git-lfs#5968 (comment)
@chrisd8088 chrisd8088 requested a review from a team February 14, 2025 20:30
@chrisd8088 chrisd8088 merged commit ba0029b into git-lfs:master Feb 18, 2025
@chrisd8088 chrisd8088 deleted the constant-fmt-strings branch February 18, 2025 16:53
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Feb 28, 2025
We recently updated our "netrc" Go package in PR git-lfs/go-netrc#3
with a small change to use a constant format string (as reported by
Go 1.24's "go vet" command).  We therefore now update the Go module
list in this repository to reference the latest version of our
git-lfs/go-netrc project, by running:

  go get github.com/git-lfs/go-netrc@latest

We then also run the "go mod tidy" command to update the set of Go
module hashes in the "go.sum" file.
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request Mar 5, 2025
We recently updated our "netrc" Go package in PR git-lfs/go-netrc#3
with a small change to use a constant format string (as reported by
Go 1.24's "go vet" command).  We therefore now update the Go module
list in this repository to reference the latest version of our
git-lfs/go-netrc project, by running:

  go get github.com/git-lfs/go-netrc@latest

We then also run the "go mod tidy" command to update the set of Go
module hashes in the "go.sum" file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants