Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 81 for pkgName (0.14 sec)

  1. src/go/internal/srcimporter/srcimporter_test.go

    func testImportPath(t *testing.T, pkgPath string) {
    	if !testenv.HasSrc() {
    		t.Skip("no source code available")
    	}
    
    	pkgName := path.Base(pkgPath)
    
    	pkg, err := importer.Import(pkgPath)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	if pkg.Name() != pkgName {
    		t.Errorf("got %q; want %q", pkg.Name(), pkgName)
    	}
    
    	if pkg.Path() != pkgPath {
    		t.Errorf("got %q; want %q", pkg.Path(), pkgPath)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  2. src/go/internal/gccgoimporter/parser.go

    		p.expectEOL()
    
    	case "import":
    		p.next()
    		pkgname := p.parseUnquotedString()
    		pkgpath := p.parseUnquotedString()
    		p.getPkg(pkgpath, pkgname)
    		p.parseString()
    		p.expectEOL()
    
    	case "indirectimport":
    		p.next()
    		pkgname := p.parseUnquotedString()
    		pkgpath := p.parseUnquotedString()
    		p.getPkg(pkgpath, pkgname)
    		p.expectEOL()
    
    	case "types":
    		p.next()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/check_test.go

    		t.Fatal("no source files")
    	}
    
    	// parse files
    	files, errlist := parseFiles(t, filenames, srcs, 0)
    	pkgName := "<no package>"
    	if len(files) > 0 {
    		pkgName = files[0].PkgName.Value
    	}
    	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
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/sizeof_test.go

    		{Signature{}, 28, 56},
    		{Union{}, 12, 24},
    		{Interface{}, 40, 80},
    		{Map{}, 16, 32},
    		{Chan{}, 12, 24},
    		{Named{}, 60, 112},
    		{TypeParam{}, 28, 48},
    		{term{}, 12, 24},
    
    		// Objects
    		{PkgName{}, 64, 104},
    		{Const{}, 64, 104},
    		{TypeName{}, 56, 88},
    		{Var{}, 64, 104},
    		{Func{}, 64, 104},
    		{Label{}, 60, 96},
    		{Builtin{}, 60, 96},
    		{Nil{}, 56, 88},
    
    		// Misc
    		{Scope{}, 60, 104},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 06 13:09:19 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/object.go

    	}
    	if !ea {
    		return a.pkg.path < b.pkg.path
    	}
    
    	return false
    }
    
    // A PkgName represents an imported Go package.
    // PkgNames don't have a type.
    type PkgName struct {
    	object
    	imported *Package
    	used     bool // set if the package was used
    }
    
    // NewPkgName returns a new PkgName object representing an imported package.
    // The remaining arguments set the attributes found with all Objects.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  6. src/internal/reflectlite/reflect_mirror_test.go

    				}
    			}
    		}
    	}
    	return v
    }
    
    func loadTypes(path, pkgName string, v visitor) {
    	fset := token.NewFileSet()
    
    	filter := func(fi fs.FileInfo) bool {
    		return strings.HasSuffix(fi.Name(), ".go")
    	}
    	pkgs, err := parser.ParseDir(fset, path, filter, 0)
    	if err != nil {
    		panic(err)
    	}
    
    	pkg := pkgs[pkgName]
    
    	for _, f := range pkg.Files {
    		ast.Walk(v, f)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 21:11:15 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. src/debug/gosym/symtab_test.go

    	assertString(t, fmt.Sprintf("receiver of %q", s2.Name), s2.ReceiverName(), "")
    }
    
    func TestIssue29551(t *testing.T) {
    	tests := []struct {
    		sym     Sym
    		pkgName string
    	}{
    		{Sym{goVersion: ver120, Name: "type:.eq.[9]debug/elf.intName"}, ""},
    		{Sym{goVersion: ver120, Name: "type:.hash.debug/elf.ProgHeader"}, ""},
    		{Sym{goVersion: ver120, Name: "type:.eq.runtime._panic"}, ""},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 09 11:28:56 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/ld.go

    		case "modinfo":
    			s, err := strconv.Unquote(args)
    			if err != nil {
    				log.Fatalf("%s:%d: invalid modinfo: %v", file, lineNum, err)
    			}
    			addstrdata1(ctxt, "runtime.modinfo="+s)
    		}
    	}
    }
    
    func pkgname(ctxt *Link, lib string) string {
    	return path.Clean(lib)
    }
    
    func findlib(ctxt *Link, lib string) (string, bool) {
    	name := path.Clean(lib)
    
    	var pname string
    	isshlib := false
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 22 16:48:30 UTC 2023
    - 8K bytes
    - Viewed (0)
  9. src/go/types/sizeof_test.go

    		{Signature{}, 28, 56},
    		{Union{}, 12, 24},
    		{Interface{}, 40, 80},
    		{Map{}, 16, 32},
    		{Chan{}, 12, 24},
    		{Named{}, 60, 112},
    		{TypeParam{}, 28, 48},
    		{term{}, 12, 24},
    
    		// Objects
    		{PkgName{}, 48, 88},
    		{Const{}, 48, 88},
    		{TypeName{}, 40, 72},
    		{Var{}, 48, 88},
    		{Func{}, 48, 88},
    		{Label{}, 44, 80},
    		{Builtin{}, 44, 80},
    		{Nil{}, 40, 72},
    
    		// Misc
    		{Scope{}, 44, 88},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 06 13:09:19 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  10. src/go/types/api.go

    //
    // Precondition: the Defs and Implicts maps are populated.
    func (info *Info) PkgNameOf(imp *ast.ImportSpec) *PkgName {
    	var obj Object
    	if imp.Name != nil {
    		obj = info.Defs[imp.Name]
    	} 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: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
Back to top