- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for codeRoots (0.14 sec)
-
src/cmd/doc/dirs.go
} } } } var testGOPATH = false // force GOPATH use for testing // codeRoots returns the code roots to search for packages. // In GOPATH mode this is GOROOT/src and GOPATH/src, with empty import paths. // In module mode, this is each module root, with an import path set to its module path. func codeRoots() []Dir { codeRootsCache.once.Do(func() { codeRootsCache.roots = findCodeRoots() })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 17:49:12 UTC 2022 - 9K bytes - Viewed (0) -
src/cmd/doc/pkg.go
// But if we started with a directory name, we never knew the import path. // Either way, we don't know it now, and it's cheap to (re)compute it. if usingModules { for _, root := range codeRoots() { if pkg.build.Dir == root.dir { importPath = root.importPath break } if strings.HasPrefix(pkg.build.Dir, root.dir+string(filepath.Separator)) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/go/internal/modfetch/coderepo.go
// pseudoMajor = v2 // codeDir := "" if codeRoot != path { if !hasPathPrefix(pathPrefix, codeRoot) { return nil, fmt.Errorf("repository rooted at %s cannot contain module %s", codeRoot, path) } codeDir = strings.Trim(pathPrefix[len(codeRoot):], "/") } r := &codeRepo{ modPath: path, code: code, codeRoot: codeRoot, codeDir: codeDir, pathPrefix: pathPrefix,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:50:24 UTC 2024 - 38.4K bytes - Viewed (0)