1 package filtering 2 3 import "fmt" 4 5 // Position represents a position in a filter expression. 6 type Position struct { 7 // Offset is the byte offset, starting at 0. 8 Offset int32 9 // Line is the line number, starting at 1. 10 Line int32 11 // Column is the column number, starting at 1 (character count per line). 12 Column int32 13 } 14 15 // String returns a string representation of the position on the format <line>:<column>. 16 func (p Position) String() string { 17 return fmt.Sprintf("%d:%d", p.Line, p.Column) 18 } 19