Go stdlib package — go/token. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.File.AddLine()NeutralFile.AddLine(offset int)
AddLine adds the line offset for a new line.
.File.AddLineColumnInfo()NeutralFile.AddLineColumnInfo(offset int, filename string, line int, column int)
AddLineColumnInfo adds alternative file, line, and column number
.File.AddLineInfo()NeutralFile.AddLineInfo(offset int, filename string, line int)
AddLineInfo is like AddLineColumnInfo with a column = 1 argument.
.File.Base()NeutralFile.Base() int
Base returns the base offset of file f as registered with AddFile.
.File.Line()NeutralFile.Line(p Pos) int
Line returns the line number for the given file position p;
.File.LineCount()NeutralFile.LineCount() int
LineCount returns the number of lines in file f.
.File.LineStart()NeutralFile.LineStart(line int) Pos
LineStart returns the Pos value of the start of the specified line.
.File.Lines()NeutralFile.Lines() []int
Lines returns the effective line offset table of the form described by SetLines.
.File.MergeLine()NeutralFile.MergeLine(line int)
MergeLine merges a line with the following line. It is akin to replacing
.File.Name()NeutralFile.Name() string
Name returns the file name of file f as registered with AddFile.
| FQN | Field | |
|---|---|---|
| go/token | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # go/token