Skip to content

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

@1Mark

Description

@1Mark

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`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions