Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 81 for pkgName (0.22 sec)

  1. src/go/types/check_test.go

    	}
    
    	// parse files
    	files, errlist := parseFiles(t, filenames, srcs, parser.AllErrors)
    	pkgName := "<no package>"
    	if len(files) > 0 {
    		pkgName = files[0].Name.Name
    	}
    	listErrors := manual && !*verifyErrors
    	if listErrors && len(errlist) > 0 {
    		t.Errorf("--- %s:", pkgName)
    		for _, err := range errlist {
    			t.Error(err)
    		}
    	}
    
    	// set up typechecker
    	var conf Config
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    			return ast.NewIdent(t.Obj().Name())
    		}
    		pkgName := t.Obj().Pkg().Name()
    
    		// If the file already imports the package under another name, use that.
    		for _, cand := range f.Imports {
    			if path, _ := strconv.Unquote(cand.Path.Value); path == t.Obj().Pkg().Path() {
    				if cand.Name != nil && cand.Name.Name != "" {
    					pkgName = cand.Name.Name
    				}
    			}
    		}
    		if pkgName == "." {
    			return ast.NewIdent(t.Obj().Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  3. src/cmd/covdata/dump.go

    	// pkgpaths records all package import paths encountered while
    	// visiting coverage data files (used to implement the "pkglist"
    	// subcommand).
    	pkgpaths map[string]struct{}
    
    	// Current package name and import path.
    	pkgName       string
    	pkgImportPath string
    
    	// Module path for current package (may be empty).
    	modulePath string
    
    	// Dump subcommand (ex: "textfmt", "debugdump", etc).
    	cmd string
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 11:36:57 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/api.go

    //
    // Precondition: the Defs and Implicts maps are populated.
    func (info *Info) PkgNameOf(imp *syntax.ImportDecl) *PkgName {
    	var obj Object
    	if imp.LocalPkgName != nil {
    		obj = info.Defs[imp.LocalPkgName]
    	} else {
    		obj = info.Implicits[imp]
    	}
    	pkgname, _ := obj.(*PkgName)
    	return pkgname
    }
    
    // TypeAndValue reports the type and value (for constants)
    // of the corresponding expression.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  5. api/go1.5.txt

    pkg go/types, method (*PkgName) Exported() bool
    pkg go/types, method (*PkgName) Id() string
    pkg go/types, method (*PkgName) Imported() *Package
    pkg go/types, method (*PkgName) Name() string
    pkg go/types, method (*PkgName) Parent() *Scope
    pkg go/types, method (*PkgName) Pkg() *Package
    pkg go/types, method (*PkgName) Pos() token.Pos
    pkg go/types, method (*PkgName) String() string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go

    		return false
    	}
    	switch sel.Sel.Name {
    	case "WithCancel", "WithTimeout", "WithDeadline":
    	default:
    		return false
    	}
    	if x, ok := sel.X.(*ast.Ident); ok {
    		if pkgname, ok := info.Uses[x].(*types.PkgName); ok {
    			return pkgname.Imported().Path() == contextPackage
    		}
    		// Import failed, so we can't check package path.
    		// Just check the local package name (heuristic).
    		return x.Name == "context"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typexpr.go

    	// (This code is only needed for dot-imports. Without them,
    	// we only have to mark variables, see *Var case below).
    	if pkgName := check.dotImportMap[dotImportKey{scope, obj.Name()}]; pkgName != nil {
    		pkgName.used = true
    	}
    
    	switch obj := obj.(type) {
    	case *PkgName:
    		check.errorf(e, InvalidPkgUse, "use of package %s not in selector", obj.name)
    		return
    
    	case *Const:
    		check.addDeclDep(obj)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/typeset_test.go

    		file, err := syntax.Parse(nil, strings.NewReader(src), errh, nil, 0)
    		if err != nil {
    			t.Fatalf("%s: %v (invalid test case)", body, err)
    		}
    
    		// type check
    		var conf Config
    		pkg, err := conf.Check(file.PkgName.Value, []*syntax.File{file}, nil)
    		if err != nil {
    			t.Fatalf("%s: %v (invalid test case)", body, err)
    		}
    
    		// lookup T
    		obj := pkg.scope.Lookup("T")
    		if obj == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 07 21:37:14 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  9. src/go/internal/gccgoimporter/parser_test.go

    }
    
    func TestTypeParser(t *testing.T) {
    	for _, test := range typeParserTests {
    		var p parser
    		p.init("test.gox", strings.NewReader(test.typ), make(map[string]*types.Package))
    		p.version = "v2"
    		p.pkgname = test.id
    		p.pkgpath = test.id
    		p.maybeCreatePackage()
    		typ := p.parseType(p.pkg)
    
    		if p.tok != scanner.EOF {
    			t.Errorf("expected full parse, stopped at %q", p.lit)
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 26 20:35:55 UTC 2018
    - 2.8K bytes
    - Viewed (0)
  10. src/cmd/internal/testdir/testdir_test.go

    	m := make(map[string]*goDirPkg)
    	for _, file := range files {
    		name := file.Name()
    		pkgname, err := getPackageNameFromSource(filepath.Join(dir, name))
    		if err != nil {
    			t.Fatal(err)
    		}
    		p, ok := m[pkgname]
    		if singlefilepkgs || !ok {
    			p = &goDirPkg{name: pkgname}
    			pkgs = append(pkgs, p)
    			m[pkgname] = p
    		}
    		p.files = append(p.files, name)
    	}
    	return pkgs
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
Back to top