Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.18: Errorf does not support error-wrapping directive %w #430

Closed
eclipseo opened this issue Jan 14, 2022 · 0 comments · Fixed by #431
Closed

Go 1.18: Errorf does not support error-wrapping directive %w #430

eclipseo opened this issue Jan 14, 2022 · 0 comments · Fixed by #431
Labels

Comments

@eclipseo
Copy link
Contributor

On Fedora Rawhide, x86_64, Golang 1.18~beta1:

# github.com/prometheus/procfs
./mountstats_test.go:396:4: (*testing.common).Errorf does not support error-wrapping directive %w
./mountstats_test.go:437:3: (*testing.common).Errorf does not support error-wrapping directive %w
./swaps_test.go:105:5: (*testing.common).Errorf does not support error-wrapping directive %w

This is due to this change: golang/go#47641

eclipseo added a commit to eclipseo/procfs that referenced this issue Jan 14, 2022
Go 1.18 introduced a change where only fmt.Errorf function accepts the %w verb.
Other Errorf function like t.Errorf do not accept it anymore.

See golang/go#47641

Fix: prometheus#430
@SuperQ SuperQ added the bug label Jan 14, 2022
eclipseo added a commit to eclipseo/procfs that referenced this issue Jan 14, 2022
Go 1.18 introduced a change where only fmt.Errorf function accepts the %w verb.
Other Errorf function like t.Errorf do not accept it anymore.

See golang/go#47641

Fix: prometheus#430

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
discordianfish pushed a commit that referenced this issue Jan 21, 2022
Go 1.18 introduced a change where only fmt.Errorf function accepts the %w verb.
Other Errorf function like t.Errorf do not accept it anymore.

See golang/go#47641

Fix: #430

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
remijouannet pushed a commit to remijouannet/procfs that referenced this issue Oct 20, 2022
Go 1.18 introduced a change where only fmt.Errorf function accepts the %w verb.
Other Errorf function like t.Errorf do not accept it anymore.

See golang/go#47641

Fix: prometheus#430

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants