package bufr type Position struct { Index int Line int Column int } func (p *Position) Advance(rn rune) { p.Index++ if rn == '\n' { p.Line++ p.Column = 0 } else { p.Column++ } }