Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for UncachedCwd (0.33 sec)

  1. src/cmd/go/internal/base/path.go

    	"strings"
    	"sync"
    )
    
    var cwd string
    var cwdOnce sync.Once
    
    // UncachedCwd returns the current working directory.
    // Most callers should use Cwd, which caches the result for future use.
    // UncachedCwd is appropriate to call early in program startup before flag parsing,
    // because the -C flag may change the current directory.
    func UncachedCwd() string {
    	wd, err := os.Getwd()
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 19:17:27 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/cmd/go/internal/toolchain/select.go

    // and returns the go version and toolchain lines from the file.
    // The toolchain line overrides the version line
    func modGoToolchain() (file, goVers, toolchain string) {
    	wd := base.UncachedCwd()
    	file = modload.FindGoWork(wd)
    	// $GOWORK can be set to a file that does not yet exist, if we are running 'go work init'.
    	// Do not try to load the file in that case
    	if _, err := os.Stat(file); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top