| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /opt/golang/1.22.0/src/cmd/go/testdata/script/ |
| Current File : //opt/golang/1.22.0/src/cmd/go/testdata/script/mod_get_trailing_slash.txt |
# go list should succeed to load a package ending with ".go" if the path does # not correspond to an existing local file. Listing a pattern ending with # ".go/" should try to list a package regardless of whether a file exists at the # path without the suffixed "/" or not. go list example.com/dotgo.go stdout ^example.com/dotgo.go$ go list example.com/dotgo.go/ stdout ^example.com/dotgo.go$ # go get should succeed in either case, with or without a version. # Arguments are interpreted as packages or package patterns with versions, # not source files. go get example.com/dotgo.go go get example.com/dotgo.go/ go get example.com/dotgo.go@v1.0.0 go get example.com/dotgo.go/@v1.0.0 -- go.mod -- module m go 1.13 require example.com/dotgo.go v1.0.0 -- go.sum -- example.com/dotgo.go v1.0.0 h1:XKJfs0V8x2PvY2tX8bJBCEbCDLnt15ma2onwhVpew/I= example.com/dotgo.go v1.0.0/go.mod h1:Qi6z/X3AC5vHiuMt6HF2ICx3KhIBGrMdrA7YoPDKqR0= -- use.go -- package use import _ "example.com/dotgo.go"