Source File
position.go
Belonging Package
go/token
package token
import (
)
func ( *File) ( int, string, int) {
.AddLineColumnInfo(, , , 1)
}
if := searchLineInfos(.infos, ); >= 0 {
:= &.infos[]
= .Filename
:= - ( + 1) // line distance from alternative position base
= .Line +
= 0
func ( *File) ( Pos) ( Position) {
return .PositionFor(, true)
}
if := searchFiles(.files, int()); >= 0 {
func ( *FileSet) ( Pos) ( Position) {
return .PositionFor(, true)
}
, := 0, len()
for < {
if [] <= {
= + 1
} else {
=
}
}
return - 1
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |