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

     1  # Unknown lines should be ignored in dependency go.mod files.
     2  go list -m -mod=mod all
     3  
     4  # ... and in replaced dependency go.mod files.
     5  cp go.mod go.mod.usesub
     6  go list -m -mod=mod all
     7  
     8  # ... but not in the main module.
     9  cp go.mod.bad go.mod
    10  ! go list -m -mod=mod all
    11  stderr 'unknown directive: hello'
    12  
    13  -- go.mod --
    14  module m
    15  require rsc.io/badmod v1.0.0
    16  -- go.mod.bad --
    17  module m
    18  hello world
    19  -- go.mod.usesub --
    20  module m
    21  require rsc.io/badmod v1.0.0
    22  replace rsc.io/badmod v1.0.0 => ./sub
    23  -- sub/go.mod --
    24  module sub
    25  hello world
    26  

View as plain text