Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for PlusBuildLines (0.3 sec)

  1. src/go/build/constraint/expr_test.go

    				t.Fatal(err)
    			}
    			lines, err := PlusBuildLines(x)
    			if err != nil {
    				if tt.err == nil {
    					t.Errorf("PlusBuildLines(%q): unexpected error: %v", tt.in, err)
    				} else if tt.err != err {
    					t.Errorf("PlusBuildLines(%q): error %v, want %v", tt.in, err, tt.err)
    				}
    				return
    			}
    			if tt.err != nil {
    				t.Errorf("PlusBuildLines(%q) = %v, want error %v", tt.in, lines, tt.err)
    				return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 18 22:36:55 UTC 2021
    - 7.6K bytes
    - Viewed (0)
  2. src/go/build/constraint/expr.go

    	}
    	return true
    }
    
    var errComplex = errors.New("expression too complex for // +build lines")
    
    // PlusBuildLines returns a sequence of “// +build” lines that evaluate to the build expression x.
    // If the expression is too complex to convert directly to “// +build” lines, PlusBuildLines returns an error.
    func PlusBuildLines(x Expr) ([]string, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  3. src/go/printer/gobuild.go

    		block = append(block, "//go:build "...)
    		block = append(block, x.String()...)
    		block = append(block, tabwriter.Escape, '\n')
    		if len(p.plusBuild) > 0 {
    			lines, err := constraint.PlusBuildLines(x)
    			if err != nil {
    				lines = []string{"// +build error: " + err.Error()}
    			}
    			for _, line := range lines {
    				block = append(block, tabwriter.Escape)
    				block = append(block, line...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go

    		return
    	}
    
    	// Have both //go:build and // +build,
    	// with no errors found (crossCheck still true).
    	// Check they match.
    	var want constraint.Expr
    	lines, err := constraint.PlusBuildLines(check.goBuild)
    	if err != nil {
    		check.pass.Reportf(check.goBuildPos, "%v", err)
    		return
    	}
    	for _, line := range lines {
    		y, err := constraint.Parse(line)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"IsPlusBuild", Func, 16},
    		{"NotExpr", Type, 16},
    		{"NotExpr.X", Field, 16},
    		{"OrExpr", Type, 16},
    		{"OrExpr.X", Field, 16},
    		{"OrExpr.Y", Field, 16},
    		{"Parse", Func, 16},
    		{"PlusBuildLines", Func, 16},
    		{"SyntaxError", Type, 16},
    		{"SyntaxError.Err", Field, 16},
    		{"SyntaxError.Offset", Field, 16},
    		{"TagExpr", Type, 16},
    		{"TagExpr.Tag", Field, 16},
    	},
    	"go/constant": {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  6. api/go1.16.txt

    pkg go/build/constraint, func IsGoBuild(string) bool
    pkg go/build/constraint, func IsPlusBuild(string) bool
    pkg go/build/constraint, func Parse(string) (Expr, error)
    pkg go/build/constraint, func PlusBuildLines(Expr) ([]string, error)
    pkg go/build/constraint, method (*AndExpr) Eval(func(string) bool) bool
    pkg go/build/constraint, method (*AndExpr) String() string
    pkg go/build/constraint, method (*NotExpr) Eval(func(string) bool) bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 02 16:30:41 UTC 2022
    - 479.2K bytes
    - Viewed (0)
Back to top