Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for IsLang (0.55 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/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)
  7. 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