...

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

Documentation: cmd/go/testdata/script

     1cp go.mod go.mod.orig
     2go mod tidy
     3cmp go.mod go.mod.orig
     4
     5-- go.mod --
     6module example.com/tidy
     7
     8go 1.16
     9
    10require (
    11	example.net/incomplete v0.1.0
    12	example.net/indirect v0.2.0 // indirect
    13	example.net/toolow v0.1.0
    14)
    15
    16replace (
    17	example.net/incomplete v0.1.0 => ./incomplete
    18	example.net/indirect v0.1.0 => ./indirect.1
    19	example.net/indirect v0.2.0 => ./indirect.2
    20	example.net/toolow v0.1.0 => ./toolow
    21)
    22-- tidy.go --
    23package tidy
    24
    25import (
    26	_ "example.net/incomplete"
    27	_ "example.net/toolow"
    28)
    29
    30-- incomplete/go.mod --
    31module example.net/incomplete
    32
    33go 1.16
    34
    35// This module omits a needed requirement on example.net/indirect.
    36-- incomplete/incomplete.go --
    37package incomplete
    38
    39import _ "example.net/indirect/newpkg"
    40
    41-- toolow/go.mod --
    42module example.net/toolow
    43
    44go 1.16
    45
    46require example.net/indirect v0.1.0
    47-- toolow/toolow.go --
    48package toolow
    49
    50import _ "example.net/indirect/oldpkg"
    51
    52-- indirect.1/go.mod --
    53module example.net/indirect
    54
    55go 1.16
    56-- indirect.1/oldpkg/oldpkg.go --
    57package oldpkg
    58
    59
    60-- indirect.2/go.mod --
    61module example.net/indirect
    62
    63go 1.16
    64-- indirect.2/oldpkg/oldpkg.go --
    65package oldpkg
    66-- indirect.2/newpkg/newpkg.go --
    67package newpkg

View as plain text