...

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

Documentation: cmd/go/testdata/script

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

View as plain text