Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for plusBuild (0.16 sec)

  1. src/go/printer/gobuild.go

    	if len(p.goBuild) > 0 && p.goBuild[0] < insert {
    		insert = p.goBuild[0]
    	} else if len(p.plusBuild) > 0 && p.plusBuild[0] < insert {
    		insert = p.plusBuild[0]
    	}
    
    	var x constraint.Expr
    	switch len(p.goBuild) {
    	case 0:
    		// Synthesize //go:build expression from // +build lines.
    		for _, pos := range p.plusBuild {
    			y, err := constraint.Parse(p.commentTextAt(pos))
    			if err != nil {
    				x = nil
    				break
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go

    			// Even so, report.
    			check.pass.Reportf(pos, "%v", err)
    			check.crossCheck = false
    			return
    		}
    		if check.plusBuild == nil {
    			check.plusBuild = y
    		} else {
    			check.plusBuild = &constraint.AndExpr{X: check.plusBuild, Y: y}
    		}
    	}
    }
    
    func (check *checker) finish() {
    	if !check.crossCheck || check.plusBuildPos == token.NoPos || check.goBuildPos == token.NoPos {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modindex/build.go

    			if !constraint.IsPlusBuild(text) {
    				continue
    			}
    			plusBuild = append(plusBuild, text)
    		}
    	}
    
    	return string(goBuildBytes), plusBuild, sawBinaryOnly, nil
    }
    
    func parseFileHeader(content []byte) (trimmed, goBuild []byte, sawBinaryOnly bool, err error) {
    	end := 0
    	p := content
    	ended := false       // found non-blank, non-// line, so stopped accepting // +build lines
    	inSlashStar := false // in /* */ comment
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 17:39:23 UTC 2023
    - 26.8K bytes
    - Viewed (0)
  4. src/go/printer/printer.go

    	// shortcut common case of //-style comments
    	if text[1] == '/' {
    		if constraint.IsGoBuild(text) {
    			p.goBuild = append(p.goBuild, len(p.output))
    		} else if constraint.IsPlusBuild(text) {
    			p.plusBuild = append(p.plusBuild, len(p.output))
    		}
    		p.writeString(pos, trimRight(text), true)
    		return
    	}
    
    	// for /*-style comments, print line by line and let the
    	// write function take care of the proper indentation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  5. src/go/build/build.go

    }
    
    // ImportDir is shorthand for Default.ImportDir.
    func ImportDir(dir string, mode ImportMode) (*Package, error) {
    	return Default.ImportDir(dir, mode)
    }
    
    var (
    	plusBuild = []byte("+build")
    
    	goBuildComment = []byte("//go:build")
    
    	errMultipleGoBuild = errors.New("multiple //go:build comments")
    )
    
    func isGoBuildComment(line []byte) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  6. src/cmd/go/internal/imports/build.go

    	"bytes"
    	"cmd/go/internal/cfg"
    	"errors"
    	"fmt"
    	"go/build/constraint"
    	"strings"
    	"unicode"
    )
    
    var (
    	bSlashSlash = []byte("//")
    	bStarSlash  = []byte("*/")
    	bSlashStar  = []byte("/*")
    	bPlusBuild  = []byte("+build")
    
    	goBuildComment = []byte("//go:build")
    
    	errMultipleGoBuild = errors.New("multiple //go:build comments")
    )
    
    func isGoBuildComment(line []byte) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 30 18:50:57 UTC 2023
    - 10.4K bytes
    - Viewed (0)
Back to top