Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for IsLang (0.29 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/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)
  5. 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)
  6. 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)
  7. 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)
  8. docs/vi/docs/python-types.md

    {!../../../docs_src/python_types/tutorial001.py!}
    ```
    
    Kết quả khi gọi chương trình này:
    
    ```
    John Doe
    ```
    
    Hàm thực hiện như sau:
    
    * Lấy một `first_name` và `last_name`.
    * Chuyển đổi kí tự đầu tiên của mỗi biến sang kiểu chữ hoa với `title()`.
    * <abbr title="Đặt chúng lại với nhau thành một. Với các nội dung lần lượt.">Nối</abbr> chúng lại với nhau bằng một kí tự trắng ở giữa.
    
    ```Python hl_lines="2"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  9. src/math/rand/v2/normal.go

    // license that can be found in the LICENSE file.
    
    package rand
    
    import (
    	"math"
    )
    
    /*
     * Normal distribution
     *
     * See "The Ziggurat Method for Generating Random Variables"
     * (Marsaglia & Tsang, 2000)
     * http://www.jstatsoft.org/v05/i08/paper [pdf]
     */
    
    const (
    	rn = 3.442619855899
    )
    
    func absInt32(i int32) uint32 {
    	if i < 0 {
    		return uint32(-i)
    	}
    	return uint32(i)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 30 17:08:47 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  10. src/math/rand/normal.go

    // license that can be found in the LICENSE file.
    
    package rand
    
    import (
    	"math"
    )
    
    /*
     * Normal distribution
     *
     * See "The Ziggurat Method for Generating Random Variables"
     * (Marsaglia & Tsang, 2000)
     * http://www.jstatsoft.org/v05/i08/paper [pdf]
     */
    
    const (
    	rn = 3.442619855899
    )
    
    func absInt32(i int32) uint32 {
    	if i < 0 {
    		return uint32(-i)
    	}
    	return uint32(i)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.3K bytes
    - Viewed (0)
Back to top