...
Text file
src/cmd/go/testdata/script/build_git_sha256_go_get_branch.txt
1[short] skip
2[!git] skip
3
4env GOPRIVATE=vcs-test.golang.org
5
6go get vcs-test.golang.org/go/mod/gitrepo-sha256@basic_module
7stderr 'downloading vcs-test\.golang.org/go/mod/gitrepo-sha256 v1.3.0'
8
9go run .
10stdout '1234'
11
12-- main.go --
13package main
14
15import (
16 "fmt"
17
18 sha256repo "vcs-test.golang.org/go/mod/gitrepo-sha256"
19)
20
21func main() {
22 fmt.Println(sha256repo.Foobar(1234))
23}
24
25-- go.mod --
26module test
27
28go 1.24.3
View as plain text