- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for importComments (0.27 sec)
-
src/go/ast/import.go
lineAt(fset, pos[specIndex].Start)+1 == lineAt(fset, g.Pos()) { specIndex++ left = true } s := specs[specIndex].(*ImportSpec) importComments[s] = append(importComments[s], cgPos{left: left, cg: g}) } // Sort the import specs by import path. // Remove duplicates, when possible without data loss. // Reassign the import paths to have the same position sequence.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0) -
src/cmd/doc/main.go
case 2: // Package must be findable and importable. pkg, err := build.Import(args[0], wd, build.ImportComment) if err == nil { return pkg, args[0], args[1], false } for { packagePath, ok := findNextPackage(arg) if !ok { break } if pkg, err := build.ImportDir(packagePath, build.ImportComment); err == nil { return pkg, arg, args[1], true } } return nil, args[0], args[1], false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 12.2K bytes - Viewed (0) -
src/go/build/build.go
} if mode&ImportComment != 0 { qcom, line := findImportComment(data) if line != 0 { com, err := strconv.Unquote(qcom) if err != nil { badGoFile(name, fmt.Errorf("%s:%d: cannot parse import comment", filename, line)) } else if p.ImportComment == "" { p.ImportComment = com firstCommentFile = name } else if p.ImportComment != com {
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/cmd/doc/pkg.go
// pkg.build.ImportPath is sometimes the unhelpful "" or ".", it looks for a // directory name in GOROOT or GOPATH if that happens. func (pkg *Package) prettyPath() string { path := pkg.build.ImportComment if path == "" { path = pkg.build.ImportPath } if path != "." && path != "" { return path } // Convert the source directory into a more useful path.
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/load/pkg.go
} } if !cfg.ModulesEnabled && data.err == nil && data.p.ImportComment != "" && data.p.ImportComment != path && !strings.Contains(path, "/vendor/") && !strings.HasPrefix(path, "vendor/") { data.err = fmt.Errorf("code in directory %s expects import %q", data.p.Dir, data.p.ImportComment) } return data.p, data.err }) return p, loaded, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 28 17:00:51 UTC 2024 - 120K bytes - Viewed (0) -
src/cmd/go/internal/list/list.go
type Package struct { Dir string // directory containing package sources ImportPath string // import path of package in dir ImportComment string // path in import comment on package statement Name string // package name Doc string // package documentation string Target string // install path
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 16 16:56:39 UTC 2024 - 33.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testshared/shared_test.go
if shlib != "" { gorootInstallDir = filepath.Dir(shlib) } myContext.InstallSuffix = "_dynlink" depP, err := myContext.Import("./depBase", ".", build.ImportComment) if err != nil { return 0, fmt.Errorf("import failed: %v", err) } if depP.PkgTargetRoot == "" { gopathInstallDir = filepath.Dir(goCmd(nil, "list", "-buildmode=shared", "-f", "{{.Target}}", "./depBase"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Aug 26 01:54:41 UTC 2023 - 36.3K bytes - Viewed (0) -
src/cmd/go/alldocs.go
// // type Package struct { // Dir string // directory containing package sources // ImportPath string // import path of package in dir // ImportComment string // path in import comment on package statement // Name string // package name // Doc string // package documentation string // Target string // install path
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 16:54:28 UTC 2024 - 142.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Default", Var, 0}, {"Directive", Type, 21}, {"Directive.Pos", Field, 21}, {"Directive.Text", Field, 21}, {"FindOnly", Const, 0}, {"IgnoreVendor", Const, 6}, {"Import", Func, 0}, {"ImportComment", Const, 4}, {"ImportDir", Func, 0}, {"ImportMode", Type, 0}, {"IsLocalImport", Func, 0}, {"MultiplePackageError", Type, 4}, {"MultiplePackageError.Dir", Field, 4},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)