...
1
2# golang.org/issue/40544: regression in error stacks for parse errors
3
4env GO111MODULE=off
5cd sandbox/foo
6go list -e -json .
7stdout '"sandbox/foo"'
8stdout '"sandbox/bar"'
9stdout '"Pos": "..(/|\\\\)bar(/|\\\\)bar.go:1:1"'
10stdout '"Err": "expected ''package'', found ackage"'
11
12env GO111MODULE=on
13go list -e -json .
14stdout '"sandbox/foo"'
15stdout '"sandbox/bar"'
16stdout '"Pos": "..(/|\\\\)bar(/|\\\\)bar.go:1:1"'
17stdout '"Err": "expected ''package'', found ackage"'
18
19-- sandbox/go.mod --
20module sandbox
21
22-- sandbox/foo/foo.go --
23package pkg
24
25import "sandbox/bar"
26-- sandbox/bar/bar.go --
27ackage bar
View as plain text