Skip to content

Conversation

stephenfin
Copy link
Contributor

As done for gophercloud proper some time back.

go vet in go 1.26 now checks for fmt.Errorf calls with only a single
variable, returning the following warning if it finds any:

  non-constant format string in call to fmt.Errorf

In all cases, we can use errors.New instead. Do it.

Signed-off-by: Stephen Finucane <[email protected]>
We also lower-case some error messages.

Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Stephen Finucane <[email protected]>
Add some syntactic sugar 🍭.

  sed -i 's/interface{}/any/g' $(ag 'interface{}' -Q -l)
  gofmt -w ./..

Signed-off-by: Stephen Finucane <[email protected]>
Using the exact same configuration as gophercloud proper.

Signed-off-by: Stephen Finucane <[email protected]>
@kayrus kayrus merged commit 88fadee into gophercloud:main Sep 8, 2025
1 check passed
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