1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# The directory named go.mod should be ignored env GO111MODULE=on cd $WORK/sub go list . stdout 'x/sub' mkdir go.mod exists go.mod go list . stdout 'x/sub' -- $WORK/go.mod -- module x -- $WORK/sub/x.go -- package x