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

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

View as plain text