github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/mod_get_moved.txt (about)

     1  env GO111MODULE=on
     2  
     3  # A 'go get' that worked at a previous version should continue to work at that version,
     4  # even if the package was subsequently moved into a submodule.
     5  go mod init example.com/foo
     6  go get -d example.com/split/subpkg@v1.0.0
     7  go list -m all
     8  stdout 'example.com/split v1.0.0'
     9  
    10  # A 'go get' that simultaneously upgrades away conflicting package defitions is not ambiguous.
    11  go get example.com/split/subpkg@v1.1.0
    12  
    13  # A 'go get' without an upgrade should find the package.
    14  rm go.mod
    15  go mod init example.com/foo
    16  go get -d example.com/split/subpkg
    17  go list -m all
    18  stdout 'example.com/split/subpkg v1.1.0'
    19  
    20  
    21  # A 'go get' that worked at a previous version should continue to work at that version,
    22  # even if the package was subsequently moved into a parent module.
    23  rm go.mod
    24  go mod init example.com/foo
    25  go get -d example.com/join/subpkg@v1.0.0
    26  go list -m all
    27  stdout 'example.com/join/subpkg v1.0.0'
    28  
    29  # A 'go get' that simultaneously upgrades away conflicting package definitions is not ambiguous.
    30  go get example.com/join/subpkg@v1.1.0
    31  
    32  # A 'go get' without an upgrade should find the package.
    33  rm go.mod
    34  go mod init example.com/foo
    35  go get -d example.com/join/subpkg@v1.1.0
    36  go list -m all
    37  stdout 'example.com/join v1.1.0'