Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for FileVersion (0.18 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/versions/types_go121.go

    //go:build !go1.22
    // +build !go1.22
    
    package versions
    
    import (
    	"go/ast"
    	"go/types"
    )
    
    // FileVersion returns a language version (<=1.21) derived from runtime.Version()
    // or an unknown future version.
    func FileVersion(info *types.Info, file *ast.File) string {
    	// In x/tools built with Go <= 1.21, we do not have Info.FileVersions
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 938 bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdversion/stdversion.go

    		(*ast.File)(nil),
    		(*ast.Ident)(nil),
    	}
    	var fileVersion string // "" => no check
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    		switch n := n.(type) {
    		case *ast.File:
    			if isGenerated(n) {
    				// Suppress diagnostics in generated files (such as cgo).
    				fileVersion = ""
    			} else {
    				fileVersion = versions.Lang(versions.FileVersion(pass.TypesInfo, n))
    				// (may be "" if unknown)
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. src/go/types/version.go

    	fileVersion := check.conf.GoVersion
    	if pos := at.Pos(); pos.IsValid() {
    		fileVersion = check.versions[check.fileFor(pos)]
    	}
    
    	// We need asGoVersion (which calls version.Lang) below
    	// because fileVersion may be the (unaltered) Config.GoVersion
    	// string which may contain dot-release information.
    	version := asGoVersion(fileVersion)
    
    	return !version.isValid() || version.cmp(v) >= 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 23:12:40 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/version.go

    func (check *Checker) allowVersion(at poser, v goVersion) bool {
    	fileVersion := check.conf.GoVersion
    	if pos := at.Pos(); pos.IsKnown() {
    		fileVersion = check.versions[pos.FileBase()]
    	}
    
    	// We need asGoVersion (which calls version.Lang) below
    	// because fileVersion may be the (unaltered) Config.GoVersion
    	// string which may contain dot-release information.
    	version := asGoVersion(fileVersion)
    
    	return !version.isValid() || version.cmp(v) >= 0
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 20:44:57 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/versions/types_go122.go

    package versions
    
    import (
    	"go/ast"
    	"go/types"
    )
    
    // FileVersion returns a file's Go version.
    // The reported version is an unknown Future version if a
    // version cannot be determined.
    func FileVersion(info *types.Info, file *ast.File) string {
    	// In tools built with Go >= 1.22, the Go version of a file
    	// follow a cascades of sources:
    	// 1) types.Info.FileVersion, which follows the cascade:
    	//   1.a) file version (ast.File.GoVersion),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  6. src/go/types/check.go

    		// unlike file versions which are Go language versions only, if valid.)
    		v := check.conf.GoVersion
    
    		fileVersion := asGoVersion(file.GoVersion)
    		if fileVersion.isValid() {
    			// use the file version, if applicable
    			// (file versions are either the empty string or of the form go1.dd)
    			if pkgVersionOk {
    				cmp := fileVersion.cmp(check.version)
    				// Go 1.21 introduced the feature of setting the go.mod
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/check.go

    		// unlike file versions which are Go language versions only, if valid.)
    		v := check.conf.GoVersion
    
    		fileVersion := asGoVersion(file.GoVersion)
    		if fileVersion.isValid() {
    			// use the file version, if applicable
    			// (file versions are either the empty string or of the form go1.dd)
    			if pkgVersionOk {
    				cmp := fileVersion.cmp(check.version)
    				// Go 1.21 introduced the feature of setting the go.mod
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/telemetry/internal/counter/file.go

    	if !bytes.HasPrefix(m.mapping.Data, hdr) {
    		return nil, fmt.Errorf("counter: header mismatch")
    	}
    	m.hdrLen = uint32(len(hdr))
    
    	return m, nil
    }
    
    const (
    	FileVersion = "v1"
    	hdrPrefix   = "# telemetry/counter file " + FileVersion + "\n"
    	recordUnit  = 32
    	maxMetaLen  = 512
    	numHash     = 512 // 2kB for hash table
    	maxNameLen  = 4 * 1024
    	limitOff    = 0
    	hashOff     = 4
    	pageSize    = 16 * 1024
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    					vars = append(vars, obj)
    				}
    			}
    		}
    		var body *ast.BlockStmt
    		switch n := n.(type) {
    		case *ast.File:
    			// Only traverse the file if its goversion is strictly before go1.22.
    			goversion := versions.FileVersion(pass.TypesInfo, n)
    			return versions.Before(goversion, versions.Go1_22)
    		case *ast.RangeStmt:
    			body = n.Body
    			addVar(n.Key)
    			addVar(n.Value)
    		case *ast.ForStmt:
    			body = n.Body
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/api_test.go

    		{"go1.21.1", "go1.19", "go1.19"},     // file downgrade permitted (module version is >= go1.21)
    	} {
    		var src string
    		if test.fileVersion != "" {
    			src = "//go:build " + test.fileVersion + "\n"
    		}
    		src += "package p"
    
    		conf := Config{GoVersion: test.goVersion}
    		versions := make(map[*syntax.PosBase]string)
    		var info Info
    		info.FileVersions = versions
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top