- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for ShouldBuild (0.18 sec)
-
src/go/build/build_test.go
tags := map[string]bool{} shouldBuild, binaryOnly, err := ctx.shouldBuild([]byte(tt.content), tags) if shouldBuild != tt.shouldBuild || binaryOnly != tt.binaryOnly || !reflect.DeepEqual(tags, tt.tags) || err != tt.err { t.Errorf("mismatch:\n"+ "have shouldBuild=%v, binaryOnly=%v, tags=%v, err=%v\n"+ "want shouldBuild=%v, binaryOnly=%v, tags=%v, err=%v", shouldBuild, binaryOnly, tags, err,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 16:24:01 UTC 2023 - 23.9K bytes - Viewed (0) -
src/cmd/go/internal/imports/build.go
} // If //go:build line is present, it controls. // Otherwise fall back to +build processing. var shouldBuild bool switch { case goBuild != nil: x, err := constraint.Parse(string(goBuild)) if err != nil { return false } shouldBuild = eval(x, tags, true) default: shouldBuild = true p := content for len(p) > 0 { line := p if i := bytes.IndexByte(line, '\n'); i >= 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 30 18:50:57 UTC 2023 - 10.4K bytes - Viewed (0) -
src/cmd/go/internal/modindex/read.go
} } var shouldBuild = true if !ctxt.goodOSArchFile(name, allTags) && !ctxt.UseAllFiles { shouldBuild = false } else if goBuildConstraint := tf.goBuildConstraint(); goBuildConstraint != "" { x, err := constraint.Parse(goBuildConstraint) if err != nil { return p, fmt.Errorf("%s: parsing //go:build line: %v", name, err) } shouldBuild = ctxt.eval(x, allTags)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 29.7K bytes - Viewed (0) -
src/go/build/build.go
// // marks the file as applicable only on Windows and Linux. // // For each build tag it consults, shouldBuild sets allTags[tag] = true. // // shouldBuild reports whether the file should be built // and whether a //go:binary-only-package comment was found. func (ctxt *Context) shouldBuild(content []byte, allTags map[string]bool) (shouldBuild, binaryOnly bool, err error) { // Identify leading run of // comments and blank lines,
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/go/internal/modcmd/vendor.go
f, err := fsys.Open(filepath.Join(dir, info.Name())) if err != nil { base.Fatal(err) } defer f.Close() content, err := imports.ReadImports(f, false, nil) if err == nil && !imports.ShouldBuild(content, imports.AnyTags()) { // The file is explicitly tagged "ignore", so it can't affect the build. // Leave it out. return false } return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 14:19:59 UTC 2024 - 14.5K bytes - Viewed (0) -
src/cmd/dist/build.go
default: return false } } // shouldbuild reports whether we should build this file. // It applies the same rules that are used with context tags // in package go/build, except it's less picky about the order // of GOOS and GOARCH. // We also allow the special tag cmd_go_bootstrap. // See ../go/bootstrap.go and package go/build. func shouldbuild(file, pkg string) bool { // Check file name for GOOS or GOARCH.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
src/cmd/go/internal/load/pkg.go
// loader said there weren't. Which one is right? // Without this special-case hack, the TestScript/test_vet case fails // on the vetfail/p1 package (added in CL 83955). // Apparently, imports.ShouldBuild biases toward rejecting files // with invalid build constraints, whereas ImportDir biases toward // accepting them. // // TODO(#41410: Figure out how this actually ought to work and fix
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 28 17:00:51 UTC 2024 - 120K bytes - Viewed (0)