github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_get_trailing_slash.txt (about) 1 # go list should succeed to load a package ending with ".go" if the path does 2 # not correspond to an existing local file. Listing a pattern ending with 3 # ".go/" should try to list a package regardless of whether a file exists at the 4 # path without the suffixed "/" or not. 5 go list example.com/dotgo.go 6 stdout ^example.com/dotgo.go$ 7 go list example.com/dotgo.go/ 8 stdout ^example.com/dotgo.go$ 9 10 # go get -d should succeed in either case, with or without a version. 11 # Arguments are interpreted as packages or package patterns with versions, 12 # not source files. 13 go get -d example.com/dotgo.go 14 go get -d example.com/dotgo.go/ 15 go get -d example.com/dotgo.go@v1.0.0 16 go get -d example.com/dotgo.go/@v1.0.0 17 18 # go get (without -d) should also succeed in either case. 19 [short] skip 20 go get example.com/dotgo.go 21 go get example.com/dotgo.go/ 22 go get example.com/dotgo.go@v1.0.0 23 go get example.com/dotgo.go/@v1.0.0 24 25 -- go.mod -- 26 module m 27 28 go 1.13 29 30 require example.com/dotgo.go v1.0.0