...

Text file src/cmd/go/testdata/script/mod_indirect_main.txt

Documentation: cmd/go/testdata/script

     1env GO111MODULE=on
     2
     3# Regression test for golang.org/issue/29773: 'go list -m' was not following
     4# dependencies through older versions of the main module.
     5
     6go list -f '{{with .Module}}{{.Path}}{{with .Version}} {{.}}{{end}}{{end}}' all
     7cmp stdout pkgmods.txt
     8
     9go list -m all
    10cmp stdout mods.txt
    11
    12go mod graph
    13cmp stdout graph.txt
    14
    15-- go.mod --
    16module golang.org/issue/root
    17
    18go 1.12
    19
    20replace (
    21	golang.org/issue/mirror v0.1.0 => ./mirror-v0.1.0
    22	golang.org/issue/pkg v0.1.0 => ./pkg-v0.1.0
    23	golang.org/issue/root v0.1.0 => ./root-v0.1.0
    24)
    25
    26require golang.org/issue/mirror v0.1.0
    27
    28-- root.go --
    29package root
    30
    31import _ "golang.org/issue/mirror"
    32
    33-- mirror-v0.1.0/go.mod --
    34module golang.org/issue/mirror
    35
    36require golang.org/issue/root v0.1.0
    37
    38-- mirror-v0.1.0/mirror.go --
    39package mirror
    40
    41import _ "golang.org/issue/pkg"
    42
    43-- pkg-v0.1.0/go.mod --
    44module golang.org/issue/pkg
    45
    46-- pkg-v0.1.0/pkg.go --
    47package pkg
    48
    49-- root-v0.1.0/go.mod --
    50module golang.org/issue/root
    51
    52require golang.org/issue/pkg v0.1.0
    53
    54-- pkgmods.txt --
    55golang.org/issue/mirror v0.1.0
    56golang.org/issue/pkg v0.1.0
    57golang.org/issue/root
    58-- mods.txt --
    59golang.org/issue/root
    60golang.org/issue/mirror v0.1.0 => ./mirror-v0.1.0
    61golang.org/issue/pkg v0.1.0 => ./pkg-v0.1.0
    62-- graph.txt --
    63golang.org/issue/root go@1.12
    64golang.org/issue/root golang.org/issue/mirror@v0.1.0
    65golang.org/issue/mirror@v0.1.0 golang.org/issue/root@v0.1.0
    66golang.org/issue/root@v0.1.0 golang.org/issue/pkg@v0.1.0

View as plain text