You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The entire test file is presented as the example when it contains a single example function, at least one other function, type, variable, or constant declaration, and no test or benchmark functions.
I expected to see the example for using errors.As, a rather small snippet containing:
A large amount of code containing tests defined in https://golang.org/src/errors/wrap_test.go, with the actual example code transformed into a func main at the very bottom.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes and tip as well.
What operating system and processor architecture are you using (
go env
)?Not revelant.
What did you do?
Visited https://golang.org/pkg/errors/#example_As.
Then visited https://godoc.org/errors#example-As and https://pkg.go.dev/errors/?tab=doc#example-As to compare, same problem.
What did you expect to see?
As per documented in https://golang.org/pkg/testing/#hdr-Examples (emphasis mine):
I expected to see the example for using
errors.As
, a rather small snippet containing:As defined in https://golang.org/src/errors/wrap_test.go?s=4623:4893#L241.
What did you see instead?
A large amount of code containing tests defined in https://golang.org/src/errors/wrap_test.go, with the actual example code transformed into a
func main
at the very bottom.The text was updated successfully, but these errors were encountered: