go/token.Position.Line (field)
72 uses
go/token (current package)
position.go#L23: Line int // line number, starting at 1
position.go#L28: func (pos *Position) IsValid() bool { return pos.Line > 0 }
position.go#L45: s += fmt.Sprintf("%d", pos.Line)
position.go#L290: return f.Position(p).Line
position.go#L337: pos.Filename, pos.Line, pos.Column = f.unpack(offset, adjusted)
go/ast
commentmap.go#L179: qpos.Line = infinity
commentmap.go#L197: (pgend.Line == r.pos.Line ||
commentmap.go#L198: pgend.Line+1 == r.pos.Line && r.end.Line+1 < qpos.Line):
commentmap.go#L206: (pend.Line == r.pos.Line ||
commentmap.go#L207: pend.Line+1 == r.pos.Line && r.end.Line+1 < qpos.Line ||
import.go#L56: return fset.PositionFor(pos, false).Line
go/build
read.go#L47: Line: 1,
read.go#L115: r.pos.Line++
go/parser
parser.go#L89: fmt.Printf("%5d:%3d: ", pos.Line, pos.Column)
parser.go#L239: if n > 0 && p.errors[n-1].Pos.Line == epos.Line {
go/printer
nodes.go#L49: n := nlimit(line - p.pos.Line)
nodes.go#L135: if prev.IsValid() && prev.Line == next.Line {
nodes.go#L150: if prev.IsValid() && prev.Line == line && line == endLine {
nodes.go#L179: if prev.IsValid() && prev.Line < line && p.linebreak(line, 0, ws, true) > 0 {
nodes.go#L195: prevLine := prev.Line
nodes.go#L296: if mode&commaTerm != 0 && next.IsValid() && p.pos.Line < next.Line {
nodes.go#L768: xline := p.pos.Line // before the operator (it may be on the next line!)
nodes.go#L1111: if line := p.lineFor(x.Sel.Pos()); p.pos.IsValid() && p.pos.Line < line {
nodes.go#L1826: if startPos.IsValid() && p.pos.IsValid() && p.posFor(startPos).Line == p.pos.Line {
printer.go#L100: p.pos = token.Position{Line: 1, Column: 1}
printer.go#L101: p.out = token.Position{Line: 1, Column: 1}
printer.go#L193: return p.out.Line - line
printer.go#L204: p.cachedLine = p.fset.PositionFor(pos, false /* absolute position */).Line
printer.go#L211: if pos.IsValid() && (p.out.Line != pos.Line || p.out.Filename != pos.Filename) {
printer.go#L213: p.output = append(p.output, fmt.Sprintf("//line %s:%d\n", pos.Filename, pos.Line)...)
printer.go#L217: p.out.Line = pos.Line
printer.go#L265: p.pos.Line += n
printer.go#L266: p.out.Line += n
printer.go#L332: p.pos.Line += nlines
printer.go#L333: p.out.Line += nlines
printer.go#L368: if pos.Line == p.last.Line && (prev == nil || prev.Text[1] != '/') {
printer.go#L398: if pos.Line == next.Line {
printer.go#L450: n = pos.Line - p.last.Line
printer.go#L772: last.Text[1] == '*' && p.lineFor(last.Pos()) == next.Line &&
printer.go#L993: n := nlimit(next.Line - p.pos.Line)
printer.go#L1010: *p.linePtr = p.out.Line
printer.go#L1321: p.flush(token.Position{Offset: infinity, Line: infinity}, token.EOF)
go/scanner
errors.go#L60: if e.Line != f.Line {
errors.go#L61: return e.Line < f.Line
errors.go#L83: if e.Pos.Filename != last.Filename || e.Pos.Line != last.Line {
go/types
labels.go#L160: check.fset.Position(varDeclPos).Line,
golang.org/x/tools/internal/gcimporter
bexport.go#L276: line = pos.Line
iexport.go#L600: line := int64(p.Line)
iexport.go#L634: line := int64(p.Line)
gotest.tools/v3/internal/source
defers.go#L15: case fileset.Position(node.End()).Line == lineNum:
source.go#L70: case fileset.Position(node.Pos()).Line == lineNum: