Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for ImportMode (0.23 sec)

  1. src/go/importer/importer.go

    	lookup   Lookup
    }
    
    func (m *gcimports) Import(path string) (*types.Package, error) {
    	return m.ImportFrom(path, "" /* no vendoring */, 0)
    }
    
    func (m *gcimports) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) {
    	if mode != 0 {
    		panic("mode must be 0")
    	}
    	return gcimporter.Import(m.fset, m.packages, path, srcDir, m.lookup)
    }
    
    // gccgo importer
    
    type gccgoimports struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/api.go

    	// The semantics is like for ImporterFrom.ImportFrom except that
    	// dir and mode are ignored (since they are not present).
    	Import(path string) (*Package, error)
    }
    
    // ImportMode is reserved for future use.
    type ImportMode int
    
    // An ImporterFrom resolves import paths to packages; it
    // supports vendoring per https://golang.org/s/go15vendor.
    // Use go/importer to obtain an ImporterFrom implementation.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  3. src/go/types/resolver_test.go

    	imported map[string]bool
    }
    
    func (imp *resolveTestImporter) Import(string) (*Package, error) {
    	panic("should not be called")
    }
    
    func (imp *resolveTestImporter) ImportFrom(path, srcDir string, mode ImportMode) (*Package, error) {
    	if mode != 0 {
    		panic("mode must be 0")
    	}
    	if imp.importer == nil {
    		imp.importer = importer.Default().(ImporterFrom)
    		imp.imported = make(map[string]bool)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. src/go/types/api.go

    	// The semantics is like for ImporterFrom.ImportFrom except that
    	// dir and mode are ignored (since they are not present).
    	Import(path string) (*Package, error)
    }
    
    // ImportMode is reserved for future use.
    type ImportMode int
    
    // An ImporterFrom resolves import paths to packages; it
    // supports vendoring per https://golang.org/s/go15vendor.
    // Use go/importer to obtain an ImporterFrom implementation.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  5. src/go/build/build.go

    	if s == "" {
    		return def
    	}
    	return s
    }
    
    // An ImportMode controls the behavior of the Import method.
    type ImportMode uint
    
    const (
    	// If FindOnly is set, Import stops after locating the directory
    	// that should contain the sources for a package. It does not
    	// read any files in the directory.
    	FindOnly ImportMode = 1 << iota
    
    	// If AllowBinary is set, Import can be satisfied by a compiled
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stdlib_test.go

    	pkg  *Package
    	err  error
    }
    
    func (c *stdlibChecker) Import(path string) (*Package, error) {
    	panic("unimplemented: use ImportFrom")
    }
    
    func (c *stdlibChecker) ImportFrom(path, dir string, _ ImportMode) (*Package, error) {
    	if path == "unsafe" {
    		// unsafe cannot be type checked normally.
    		return Unsafe, nil
    	}
    
    	p, err := build.Default.Import(path, dir, build.FindOnly)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/go/types/stdlib_test.go

    	pkg  *Package
    	err  error
    }
    
    func (c *stdlibChecker) Import(path string) (*Package, error) {
    	panic("unimplemented: use ImportFrom")
    }
    
    func (c *stdlibChecker) ImportFrom(path, dir string, _ ImportMode) (*Package, error) {
    	if path == "unsafe" {
    		// unsafe cannot be type checked normally.
    		return Unsafe, nil
    	}
    
    	p, err := build.Default.Import(path, dir, build.FindOnly)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modindex/read.go

    }
    
    var installgorootAll = godebug.New("installgoroot").Value() == "all"
    
    // Import is the equivalent of build.Import given the information in Module.
    func (rp *IndexPackage) Import(bctxt build.Context, mode build.ImportMode) (p *build.Package, err error) {
    	defer unprotect(protect(), &err)
    
    	ctxt := (*Context)(&bctxt)
    
    	p = &build.Package{}
    
    	p.ImportPath = "."
    	p.Dir = filepath.Join(rp.modroot, rp.dir)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  9. subprojects/core/src/main/java/org/gradle/groovy/scripts/internal/GradleResolveVisitor.java

                ClassNode aliasedNode = null;
                ImportNode importNode = module.getImport(pname);
                if (importNode != null && importNode != currImportNode) {
                    aliasedNode = importNode.getType();
                }
                if (aliasedNode == null) {
                    importNode = module.getStaticImports().get(pname);
                    if (importNode != null && importNode != currImportNode) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jan 26 14:58:23 UTC 2024
    - 67.6K bytes
    - Viewed (0)
  10. src/cmd/go/internal/load/pkg.go

    	p, err := packageDataCache.Do(r.path, func() (*build.Package, error) {
    		loaded = true
    		var data struct {
    			p   *build.Package
    			err error
    		}
    		if r.dir != "" {
    			var buildMode build.ImportMode
    			buildContext := cfg.BuildContext
    			if !cfg.ModulesEnabled {
    				buildMode = build.ImportComment
    			} else {
    				buildContext.GOPATH = "" // Clear GOPATH so packages are imported as pure module packages
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
Back to top