- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for importComment (0.3 sec)
-
src/go/ast/import.go
if r != 0 { return r } iname := importName(a) jname := importName(b) r = cmp.Compare(iname, jname) if r != 0 { return r } return cmp.Compare(importComment(a), importComment(b)) }) // Dedup. Thanks to our sorting, we can just consider // adjacent pairs of imports. deduped := specs[:0] for i, s := range specs { if i == len(specs)-1 || !collapse(s, specs[i+1]) {
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/cmd/go/internal/modindex/index_test.go
checkPkg := func(t *testing.T, m *Module, pkg string, data []byte) { p := m.Package(pkg) bp, err := p.Import(build.Default, build.ImportComment) if err != nil { t.Fatal(err) } bp1, err := build.Default.Import(".", filepath.Join(src, pkg), build.ImportComment) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(bp, bp1) { t.Errorf("mismatch") t.Logf("index:\n%s", hex.Dump(data))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 28 23:35:08 UTC 2022 - 2.3K 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) -
api/go1.4.txt
pkg encoding/xml, method (*Decoder) InputOffset() int64 # CL 124940043 cmd/go, go/build: implement import comment checking, Russ Cox <******@****.***> pkg go/build, const ImportComment = 4 pkg go/build, const ImportComment ImportMode pkg go/build, type Package struct, ImportComment string # CL 155050043 go/build: Return MultiplePackageError on importing a dir containing multiple packages, Jens Frederich <******@****.***>
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 12 03:01:01 UTC 2014 - 34K 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)