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

x/website: Why is nil mentioned explicitly in t.Fatalf #51388

Closed
1Mark opened this issue Feb 27, 2022 · 1 comment
Closed

x/website: Why is nil mentioned explicitly in t.Fatalf #51388

1Mark opened this issue Feb 27, 2022 · 1 comment

Comments

@1Mark
Copy link

1Mark commented Feb 27, 2022

What is the URL of the page with the issue?

https://go.dev/doc/tutorial/add-a-test

Instead of

t.Fatalf(`Hello("Gladys") = %q, %v, want match for %#q, nil`, msg, err, want)

Use

t.Fatalf(`Hello("Gladys") = %q, %v, want match for %#q`, msg, err, want)

If agreed, then this should be updated too (transitively)
From

greetings_test.go:15: Hello("Gladys") = "Hail, %v! Well met!", <nil>, want match for `\bGladys\b`, nil

To

greetings_test.go:15: Hello("Gladys") = "Hail, %v! Well met!", <nil>, want match for `\bGladys\b`
@gopherbot gopherbot added this to the Unreleased milestone Feb 27, 2022
@seankhliao
Copy link
Member

nil is the expected error
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants