Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for IsLang (0.11 sec)

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

    //
    //	1.21 < 1.21rc1 < 1.21.0
    //
    // meaning that Go 1.21rc1 and Go 1.21.0 will both handle go.mod files that
    // say "go 1.21", but Go 1.21rc1 will not handle files that say "go 1.21.0".
    func IsLang(x string) bool {
    	return gover.IsLang(x)
    }
    
    // Lang returns the Go language version. For example, Lang("1.2.3") == "1.2".
    func Lang(x string) string {
    	return gover.Lang(x)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. src/internal/gover/gover_test.go

    var langTests = []testCase1[string, string]{
    	{"1.2rc3", "1.2"},
    	{"1.2.3", "1.2"},
    	{"1.2", "1.2"},
    	{"1", "1"},
    	{"1.999testmod", "1.999"},
    }
    
    func TestIsLang(t *testing.T) { test1(t, isLangTests, "IsLang", IsLang) }
    
    var isLangTests = []testCase1[string, bool]{
    	{"1.2rc3", false},
    	{"1.2.3", false},
    	{"1.999testmod", false},
    	{"1.22", true},
    	{"1.21", true},
    	{"1.20", false}, // == 1.20.0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/gover/gover_test.go

    var langTests = []testCase1[string, string]{
    	{"1.2rc3", "1.2"},
    	{"1.2.3", "1.2"},
    	{"1.2", "1.2"},
    	{"1", "1"},
    	{"1.999testmod", "1.999"},
    }
    
    func TestIsLang(t *testing.T) { test1(t, isLangTests, "IsLang", IsLang) }
    
    var isLangTests = []testCase1[string, bool]{
    	{"1.2rc3", false},
    	{"1.2.3", false},
    	{"1.999testmod", false},
    	{"1.22", true},
    	{"1.21", true},
    	{"1.20", false}, // == 1.20.0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/gover/mod.go

    // The caller is assumed to have checked that ModIsValid(path, vers) is true.
    func ModIsPrefix(path, vers string) bool {
    	if IsToolchain(path) {
    		if path == "toolchain" {
    			return IsLang(FromToolchain(vers))
    		}
    		return IsLang(vers)
    	}
    	// Semver
    	dots := 0
    	for i := 0; i < len(vers); i++ {
    		switch vers[i] {
    		case '-', '+':
    			return false
    		case '.':
    			dots++
    			if dots >= 2 {
    				return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 19:18:46 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  5. src/internal/gover/gover.go

    // compared using Compare.
    // If x and y compare equal, Max returns x.
    func Max(x, y string) string {
    	if Compare(x, y) < 0 {
    		return y
    	}
    	return x
    }
    
    // IsLang reports whether v denotes the overall Go language version
    // and not a specific release. Starting with the Go 1.21 release, "1.x" denotes
    // the overall language version; the first release is "1.x.0".
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modfetch/toolchain.go

    	// we don't need to access the network to know that it exists.
    	if r.path == "toolchain" && v == gover.Local() {
    		return &RevInfo{Version: prefix + v}, nil
    	}
    
    	if gover.IsLang(v) {
    		// We can only use a language (development) version if the current toolchain
    		// implements that version, and the two checks above have ruled that out.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 13 16:44:24 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  7. src/cmd/go/internal/toolchain/select.go

    				// Don't try to download a language version (sans patch component), such as go1.22.
    				// Instead, use the first toolchain of that language version, such as 1.22.0.
    				// See golang.org/issue/62278.
    				if gover.IsLang(goVers) && gover.Compare(goVers, "1.21") >= 0 {
    					gotoolchain += ".0"
    				}
    				gover.Startup.AutoGoVersion = goVers
    				gover.Startup.AutoToolchain = "" // in case we are overriding it for being too old
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modload/init.go

    	// checking that the toolchain is new enough for the Go version.
    	toolchain := "go" + old
    	if wf.Toolchain != nil {
    		toolchain = wf.Toolchain.Name
    	}
    	if gover.IsLang(gover.Local()) {
    		toolchain = gover.ToolchainMax(toolchain, "go"+goVers)
    	} else {
    		toolchain = gover.ToolchainMax(toolchain, "go"+gover.Local())
    	}
    
    	// Drop the toolchain line if it is implied by the go line
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  9. src/main/webapp/WEB-INF/orig/view/search.jsp

    						<la:message key="labels.searchoptions_all" />
    					</c:if> <c:if test="${!empty lang}">
    						<c:forEach var="sLang" items="${lang}">
    							<c:forEach var="item" items="${langItems}">
    								<c:if test="${item.value==sLang}">${f:h(item.label)}</c:if>
    							</c:forEach>
    						</c:forEach>
    					</c:if>
    			</a></li>
    			<c:if test="${displayLabelTypeItems}">
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Fri Feb 17 12:13:41 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  10. src/main/webapp/WEB-INF/view/search.jsp

    						<la:message key="labels.searchoptions_all" />
    					</c:if> <c:if test="${!empty lang}">
    						<c:forEach var="sLang" items="${lang}">
    							<c:forEach var="item" items="${langItems}">
    								<c:if test="${item.value==sLang}">${f:h(item.label)}</c:if>
    							</c:forEach>
    						</c:forEach>
    					</c:if>
    			</a></li>
    			<c:if test="${displayLabelTypeItems}">
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Fri Feb 17 12:13:41 UTC 2023
    - 6.6K bytes
    - Viewed (0)
Back to top