Debian Codegraph @

goproxytest/testdata/setup/chained.txt

raw
1 # Verify that goproxytest.Setup chains with an existing Setup function.
2 # The custom setup sets CUSTOM=hello, and then Setup should also set GOPROXY.
3 go env GOPROXY
4 stdout ^http://.*/mod$
5
6 go run main.go
7 stdout ^hello$
8
9 -- go.mod --
10 module mod
11
12 -- main.go --
13 package main
14
15 import (
16 "fmt"
17 "os"
18 )
19
20 func main() {
21 fmt.Println(os.Getenv("CUSTOM"))
22 }
23
24 -- .gomodproxy/fruit.com_v1.0.0/go.mod --
25 module fruit.com
26
27 -- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go --
28 package fruit
29
30 const Name = "Apple"