Versions in this module Expand all Collapse all v2 v2.0.2 Jun 27, 2025 v2.0.1 Jan 3, 2025 Changes in this version + var ErrIllegalBaseOrValue = errors.New("illegal base or value") + var ErrIllegalFileOffset = errors.New("illegal file offset") + var ErrIllegalPosValue = errors.New("illegal Pos value") + var ErrPosOffsetOverflow = errors.New("token.Pos offset overflow (> 2G of source code in file set)") + type File struct + func (f *File) AddLine(offset int) + func (f *File) AddLineInfo(offset int, filename string, line int) + func (f *File) Base() int + func (f *File) Line(p Pos) (int, error) + func (f *File) LineCount() int + func (f *File) Name() string + func (f *File) Offset(p Pos) (int, error) + func (f *File) Pos(offset int) (Pos, error) + func (f *File) Position(p Pos) (Position, error) + func (f *File) SetLines(lines []int) bool + func (f *File) SetLinesForContent(content []byte) + func (f *File) Size() int + type FileSet struct + func NewFileSet() *FileSet + func (s *FileSet) AddFile(filename string, base, size int) (*File, error) + func (s *FileSet) Base() int + func (s *FileSet) File(p Pos) (f *File) + func (s *FileSet) Iterate(f func(*File) bool) + func (s *FileSet) Position(p Pos) (pos Position) + func (s *FileSet) Read(decode func(interface{}) error) error + func (s *FileSet) Write(encode func(interface{}) error) error + type Pos int + const NoPos + func (p Pos) IsValid() bool + type Position struct + Column int + Filename string + Line int + Offset int + func (pos *Position) IsValid() bool + func (pos Position) String() string + type Token int + const ASSIGN + const COMMENT + const EOF + const EOL + const IDENT + const ILLEGAL + const LBRACK + const RBRACK + const STRING + func (tok Token) IsLiteral() bool + func (tok Token) IsOperator() bool + func (tok Token) String() string Other modules containing this package github.com/go-git/gcfg