Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for FromToolchain (0.15 sec)

  1. src/cmd/go/internal/gover/toolchain.go

    	if IsValid(name) {
    		return name
    	}
    	return FromToolchain(name)
    }
    
    // ToolchainMax returns the maximum of x and y interpreted as toolchain names,
    // compared using Compare(FromToolchain(x), FromToolchain(y)).
    // If x and y compare equal, Max returns x.
    func ToolchainMax(x, y string) string {
    	if Compare(FromToolchain(x), FromToolchain(y)) < 0 {
    		return y
    	}
    	return x
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. src/cmd/go/internal/gover/mod.go

    	})
    }
    
    // ModIsValid reports whether vers is a valid version syntax for the module with the given path.
    func ModIsValid(path, vers string) bool {
    	if IsToolchain(path) {
    		if path == "toolchain" {
    			return IsValid(FromToolchain(vers))
    		}
    		return IsValid(vers)
    	}
    	return semver.IsValid(vers)
    }
    
    // ModIsPrefix reports whether v is a valid version syntax prefix for the module with the given path.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:18:46 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/gover/toolchain_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package gover
    
    import "testing"
    
    func TestFromToolchain(t *testing.T) { test1(t, fromToolchainTests, "FromToolchain", FromToolchain) }
    
    var fromToolchainTests = []testCase1[string, string]{
    	{"go1.2.3", "1.2.3"},
    	{"1.2.3", ""},
    	{"go1.2.3+bigcorp", ""},
    	{"go1.2.3-bigcorp", "1.2.3"},
    	{"go1.2.3-bigcorp more text", "1.2.3"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:18:46 UTC 2023
    - 550 bytes
    - Viewed (0)
  4. src/cmd/go/internal/toolchain/path_plan9.go

    // described by de and info in directory dir.
    // The analysis only uses the name itself; it does not run the program.
    func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) {
    	v := gover.FromToolchain(de.Name())
    	if v == "" || info.Mode()&0111 == 0 {
    		return "", false
    	}
    	return v, true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 764 bytes
    - Viewed (0)
  5. src/cmd/go/internal/gover/local.go

    func LocalToolchain() string {
    	_, t := local()
    	return t
    }
    
    func local() (goVers, toolVers string) {
    	toolVers = runtime.Version()
    	if TestVersion != "" {
    		toolVers = TestVersion
    	}
    	goVers = FromToolchain(toolVers)
    	if goVers == "" {
    		// Development branch. Use "Dev" version with just 1.N, no rc1 or .0 suffix.
    		goVers = "1." + strconv.Itoa(goversion.Version)
    		toolVers = "go" + goVers
    	}
    	return goVers, toolVers
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:20:23 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  6. src/cmd/go/internal/toolchain/path_unix.go

    // described by de and info in directory dir.
    // The analysis only uses the name itself; it does not run the program.
    func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) {
    	v := gover.FromToolchain(de.Name())
    	if v == "" {
    		return "", false
    	}
    
    	// Mimicking exec.findExecutable here.
    	// ENOSYS means Eaccess is not available or not implemented.
    	// EPERM can be returned by Linux containers employing seccomp.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modfetch/toolchain.go

    	if r.path == "go" {
    		sort.Slice(list, func(i, j int) bool {
    			return gover.Compare(list[i], list[j]) < 0
    		})
    	} else {
    		sort.Slice(list, func(i, j int) bool {
    			return gover.Compare(gover.FromToolchain(list[i]), gover.FromToolchain(list[j])) < 0
    		})
    	}
    	versions.List = list
    	return versions, nil
    }
    
    func (r *toolchainRepo) Stat(ctx context.Context, rev string) (*RevInfo, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 13 16:44:24 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  8. src/cmd/go/internal/toolchain/path_windows.go

    func pathVersion(dir string, de fs.DirEntry, info fs.FileInfo) (string, bool) {
    	pathExts.once.Do(initPathExts)
    	name, _, ok := cutExt(de.Name(), pathExts.list)
    	if !ok {
    		return "", false
    	}
    	v := gover.FromToolchain(name)
    	if v == "" {
    		return "", false
    	}
    	return v, true
    }
    
    // cutExt looks for any of the known extensions at the end of file.
    // If one is found, cutExt returns the file name with the extension trimmed,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  9. src/cmd/go/internal/toolchain/select.go

    		mode = "auto"
    	} else if gotoolchain == "path" {
    		mode = "path"
    	} else {
    		min, suffix, plus := strings.Cut(gotoolchain, "+") // go1.2.3+auto
    		if min != "local" {
    			v := gover.FromToolchain(min)
    			if v == "" {
    				if plus {
    					base.Fatalf("invalid GOTOOLCHAIN %q: invalid minimum toolchain %q", gotoolchain, min)
    				}
    				base.Fatalf("invalid GOTOOLCHAIN %q", gotoolchain)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  10. src/cmd/go/internal/modload/init.go

    	// TODO(#57001): Add more tests for toolchain lines.
    	toolVers := gover.FromToolchain(toolchain)
    	if wroteGo && !opts.DropToolchain && !opts.ExplicitToolchain &&
    		gover.Compare(goVersion, gover.GoStrictVersion) >= 0 &&
    		(gover.Compare(gover.Local(), toolVers) > 0 && !gover.IsLang(gover.Local())) {
    		toolchain = "go" + gover.Local()
    		toolVers = gover.FromToolchain(toolchain)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
Back to top