package text
import "github.com/gohugoio/hugo/common/text"
Index ¶
Types ¶
type Position ¶
type Position struct { Filename string // filename, if any Offset int // byte offset, starting at 0. It's set to -1 if not provided. LineNumber int // line number, starting at 1 ColumnNumber int // column number, starting at 1 (character count per line) }
Position holds a source position in a text file or stream.
func (Position) IsValid ¶
IsValid returns true if line number is > 0.
func (Position) String ¶
type Positioner ¶
type Positioner interface { Position() Position }
Positioner represents a thing that knows its position in a text file or stream, typically an error.
Source Files ¶
- Version
- v0.56.2
- Published
- Jul 30, 2019
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 7 hours ago –
Tools for package owners.