- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for ImportMode (0.18 sec)
-
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) -
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) -
src/cmd/compile/internal/types2/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 = defaultImporter().(ImporterFrom) imp.imported = make(map[string]bool) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 10 12:59:20 UTC 2023 - 4.7K bytes - Viewed (0) -
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) -
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) -
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) -
src/go/internal/srcimporter/srcimporter.go
// type checker may not be able to determine all exported entities (e.g. due to cgo dependencies). func (p *Importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) { if mode != 0 { panic("non-zero import mode") } if abs, err := p.absPath(srcDir); err == nil { // see issue #14282 srcDir = abs } bp, err := p.ctxt.Import(path, srcDir, 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 18:54:32 UTC 2022 - 8.2K bytes - Viewed (0) -
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) -
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) -
src/go/build/build_test.go
ctxt := Default emptyDir := t.TempDir() ctxt.GOPATH = emptyDir ctxt.Dir = emptyDir tests := []struct { label string path, srcDir string mode ImportMode }{ {"Import(full, 0)", "go/build/doesnotexist", "", 0}, {"Import(local, 0)", "./doesnotexist", filepath.Join(ctxt.GOROOT, "src/go/build"), 0}, {"Import(full, FindOnly)", "go/build/doesnotexist", "", FindOnly},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 16:24:01 UTC 2023 - 23.9K bytes - Viewed (0)