...

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

Documentation: cmd/go/testdata/script

     1# Test adding sums to go.work.sum when sum isn't in go.mod.
     2
     3go run .
     4cmp go.work.sum want.sum
     5
     6-- want.sum --
     7golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:pvCbr/wm8HzDD3fVywevekufpn6tCGPY3spdHeZJEsw=
     8golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
     9rsc.io/quote v1.5.2 h1:3fEykkD9k7lYzXqCYrwGAf7iNhbk4yCjHmKBN9td4L0=
    10rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
    11-- go.work --
    12go 1.18
    13
    14use .
    15-- go.mod --
    16go 1.18
    17
    18module example.com/hi
    19
    20require "rsc.io/quote" v1.5.2
    21-- go.sum --
    22rsc.io/sampler v1.3.0 h1:HLGR/BgEtI3r0uymSP/nl2uPLsUnNJX8toRyhfpBTII=
    23rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
    24-- main.go --
    25package main
    26
    27import (
    28	"fmt"
    29	"rsc.io/quote"
    30)
    31
    32func main() {
    33	fmt.Println(quote.Hello())
    34}

View as plain text