diff options
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/mod_internal.txt')
-rw-r--r-- | libgo/go/cmd/go/testdata/script/mod_internal.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/cmd/go/testdata/script/mod_internal.txt b/libgo/go/cmd/go/testdata/script/mod_internal.txt index 5a361a4f424..1193d528ece 100644 --- a/libgo/go/cmd/go/testdata/script/mod_internal.txt +++ b/libgo/go/cmd/go/testdata/script/mod_internal.txt @@ -2,8 +2,7 @@ env GO111MODULE=on [short] skip # golang.org/x/internal should be importable from other golang.org/x modules. -rm go.mod -go mod init golang.org/x/anything +go mod edit -module=golang.org/x/anything go build . # ...and their tests... @@ -20,8 +19,7 @@ stderr 'use of internal package golang.org/x/.* not allowed' stderr 'use of internal package internal/testenv not allowed' # Dependencies should be able to use their own internal modules... -rm go.mod -go mod init golang.org/notx +go mod edit -module=golang.org/notx go build ./throughdep # ... but other modules should not, even if they have transitive dependencies. @@ -34,8 +32,7 @@ stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' # Replacing an internal module should keep it internal to the same paths. -rm go.mod -go mod init golang.org/notx +go mod edit -module=golang.org/notx go mod edit -replace golang.org/x/internal=./replace/golang.org/notx/internal go build ./throughdep @@ -50,6 +47,9 @@ go build ./throughdep stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' +-- go.mod -- +module TBD +go 1.12 -- useinternal.go -- package useinternal import _ "golang.org/x/internal/subtle" |