...

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

Documentation: cmd/go/testdata/script

     1env TESTGO_VERSION=go1.24
     2
     3go list -f '{{.Module.GoVersion}}'
     4stdout 1.15
     5
     6go mod tidy
     7go list -f '{{.Module.GoVersion}}'
     8stdout 1.15
     9
    10go get example.com/a@v1.0.1
    11go list -f '{{.Module.GoVersion}}'
    12stdout 1.15
    13
    14go get example.com/a@v1.0.1 go@1.16
    15go list -f '{{.Module.GoVersion}}'
    16stdout 1.16
    17
    18-- go.mod --
    19module m
    20go 1.15
    21
    22require (
    23	example.com/a v1.0.0
    24	example.com/b v1.0.0
    25)
    26
    27replace example.com/a v1.0.0 => ./a100
    28replace example.com/a v1.0.1 => ./a101
    29replace example.com/b v1.0.1 => ./b101
    30replace example.com/b v1.0.0 => ./b100
    31replace example.com/b v0.9.0 => ./b100
    32
    33-- x.go --
    34package m
    35
    36import (
    37	_ "example.com/a"
    38	_ "example.com/b"
    39)
    40
    41-- a100/go.mod --
    42module example.com/a
    43go 1.16
    44
    45require example.com/b v1.0.0
    46
    47-- a100/a.go --
    48package a
    49
    50-- a101/go.mod --
    51module example.com/a
    52go 1.17
    53
    54require example.com/b v1.0.1
    55
    56-- a101/a.go --
    57package a
    58
    59-- b100/go.mod --
    60module example.com/b
    61go 1.18
    62
    63-- b100/b.go --
    64package b
    65
    66-- b101/go.mod --
    67module example.com/b
    68go 1.19
    69
    70-- b101/b.go --
    71package b
    72

View as plain text