Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FindGoMod (0.16 sec)

  1. src/cmd/go/internal/modload/init.go

    	default:
    		return false
    	}
    
    	return FindGoMod(base.Cwd()) != ""
    }
    
    // FindGoMod returns the name of the go.mod file for this command,
    // or the empty string if there isn't one.
    // Most code should use Init and Enabled rather than use this directly.
    // It is exported mainly for Go toolchain switching, which must process
    // the go.mod very early at startup.
    func FindGoMod(wd string) string {
    	modRoot := findModuleRoot(wd)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/toolchain/select.go

    	// Do not try to load the file in that case
    	if _, err := os.Stat(file); err != nil {
    		file = ""
    	}
    	if file == "" {
    		file = modload.FindGoMod(wd)
    	}
    	if file == "" {
    		return "", "", ""
    	}
    
    	data, err := os.ReadFile(file)
    	if err != nil {
    		base.Fatalf("%v", err)
    	}
    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