blob: 8828738abb1d2f8f06fda43bb8ae6f0690e256d7 [file] [log] [blame]
# go list should fail to load a package ending with ".go" since that denotes
# a source file. However, ".go/" should work.
# TODO(golang.org/issue/32483): perhaps we should treat non-existent paths
# with .go suffixes as package paths instead.
! go list example.com/dotgo.go
go list example.com/dotgo.go/
stdout ^example.com/dotgo.go$
# go get -d 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 -d example.com/dotgo.go
go get -d example.com/dotgo.go/
go get -d example.com/dotgo.go@v1.0.0
go get -d example.com/dotgo.go/@v1.0.0
# go get (without -d) should also succeed in either case.
# TODO(golang.org/issue/32483): we should be consistent with 'go build',
# 'go list', and other commands. 'go list example.com/dotgo.go' (above) and
# 'go get example.com/dotgo.go' should both succeed or both fail.
[short] skip
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