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

     1  # This is a regression test for golang.org/issue/50036
     2  # Don't check sums for other modules in the workspace.
     3  
     4  cd m/sub
     5  go install -n
     6  
     7  -- go.work --
     8  go 1.18
     9  
    10  use (
    11      ./m
    12      ./m/sub
    13  )
    14  -- m/go.mod --
    15  module example.com/m
    16  
    17  go 1.18
    18  
    19  -- m/m.go --
    20  package m
    21  
    22  func M() {}
    23  -- m/sub/go.mod --
    24  module example.com/m/sub
    25  
    26  go 1.18
    27  
    28  require example.com/m v1.0.0
    29  -- m/sub/main.go --
    30  package main
    31  
    32  import "example.com/m"
    33  
    34  func main() {
    35      m.M()
    36  }
    37  

View as plain text