-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted
Milestone
Description
GO111MODULE="on"
create a new module
module github.com/t/crypto
go 1.14
Although I think modules have nothing to do with it
Create a test file that contains a Example, and deliberately give it the wrong function definition like so
func ExampleCipherBlock(b []byte) {
fmt.Println("hello")
// Output:
}
% go test -v
# github.com/t/crypto.test
/var/folders/dv/8tlwvjr91zjdyq4rk14lkkfm0000gn/T/go-build917091680/b001/_testmain.go:30:30: cannot use crypto.ExampleCipherBlock (type func([]byte)) as type func() in field value
FAIL github.com/t/crypto [build failed]
Now do the same but make a other error like so
k
func ExampleCipherBlock() {
fmt.Println("hello")
// Output:
}
% go test -v
# github.com/t/crypto
block_test.go:10:1: expected declaration, found k
FAIL github.com/t/crypto [setup failed]
gert@mac crypto %
Second one is the kind of error messages I expect, the first one completely messes up vscode because there is no way vscode can figure out where to point to.
dmitshur, mohamednizar and johnaoss
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted