- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for GoModLookup (0.2 sec)
-
src/cmd/go/internal/gover/gomod.go
"bytes" "strings" ) var nl = []byte("\n") // GoModLookup takes go.mod or go.work content, // finds the first line in the file starting with the given key, // and returns the value associated with that key. // // Lookup should only be used with non-factored verbs // such as "go" and "toolchain", usually to find versions // or version-like strings. func GoModLookup(gomod []byte, key string) string { for len(gomod) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 16:31:25 UTC 2023 - 1.1K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/select.go
file = modload.FindGoMod(wd) } if file == "" { return "", "", "" } data, err := os.ReadFile(file) if err != nil { base.Fatalf("%v", err) } return file, gover.GoModLookup(data, "go"), gover.GoModLookup(data, "toolchain") } // goInstallVersion reports whether the command line is go install m@v or go run m@v. // If so, Select must not read the go.mod or go.work file in "auto" or "path" mode.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:25:05 UTC 2024 - 23.4K bytes - Viewed (0) -
src/cmd/go/internal/modfetch/fetch.go
return "", err } checkMod(ctx, mod) // If go.mod exists (not an old legacy module), check version is not too new. if data, err := os.ReadFile(filepath.Join(dir, "go.mod")); err == nil { goVersion := gover.GoModLookup(data, "go") if gover.Compare(goVersion, gover.Local()) > 0 { return "", &gover.TooNewError{What: mod.String(), GoVersion: goVersion} } } else if !errors.Is(err, fs.ErrNotExist) { return "", err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 14:56:56 UTC 2024 - 30.3K bytes - Viewed (0) -
src/cmd/go/internal/modfetch/coderepo.go
if err != nil { return err } if gomod, err := r.code.ReadFile(ctx, rev, filepath.Join(subdir, "go.mod"), codehost.MaxGoMod); err == nil { goVers := gover.GoModLookup(gomod, "go") if gover.Compare(goVers, gover.Local()) > 0 { return &gover.TooNewError{What: r.ModulePath() + "@" + version, GoVersion: goVers} } } else if !errors.Is(err, fs.ErrNotExist) { return err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:50:24 UTC 2024 - 38.4K bytes - Viewed (0)