aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/list_export_e.txt
blob: 8e4c361fc4ede8ef11817335b365b231dfa0580f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
! go list -export ./...
stderr '^# example.com/p2\np2'${/}'main\.go:7:.*'
! stderr '^go build '

go list -f '{{with .Error}}{{.}}{{end}}' -e -export ./...
! stderr '.'
stdout '^# example.com/p2\np2'${/}'main\.go:7:.*'

go list -e -export -json=Error ./...
stdout '"Err": "# example.com/p2'

-- go.mod --
module example.com
-- p1/p1.go --
package p1

const Name = "p1"
-- p2/main.go --
package main

import "fmt"
import "example.com/p1"

func main() {
	fmt.Println(p1.Name == 5)
}