Documentation
¶
Index ¶
- Variables
- func AddEscapes(str string, escape rune, escapeRunes string) string
- func CleanMultiplePathSeps(str string, sep rune) string
- func DetectEnvVar(str, name string) bool
- func EscapeFilename(str string) string
- func ExpandIndexEscape(r iorw.Reader, i int, truth bool, fn func(rune) bool, escape rune) int
- func ExpandIndexesEscape(rd iorw.Reader, index int, truth bool, fn func(rune) bool, escape rune) (int, int)
- func ExpandLastIndexEscape(r iorw.Reader, i int, truth bool, fn func(rune) bool, escape rune) int
- func ImproveExpandIndexEscape(r iorw.Reader, i int, escape rune) int
- func IndexLineColumn(rd iorw.Reader, index int) (int, int, error)
- func LineColumnIndex(rd iorw.Reader, line, column int) (int, error)
- func RemoveEscapes(str string, escape rune) string
- func RemoveEscapesEscapable(str string, escape rune, escapable string) string
- func RemoveFilenameEscapes(f string, escape, pathSep rune) string
- func RunesExcept(runes, except string) string
- type FilePos
- type ResParser
- type Resource
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtraRunes = "_-~.%@&?!=#+" + "()[]{}<>" + "\\^" + "/" + " " + ":"
View Source
var PathItemExtraRunes = RunesExcept(ExtraRunes, excludeResourceRunes+ ":") // line/column
View Source
var ResourceExtraRunes = RunesExcept(ExtraRunes, excludeResourceRunes)
Functions ¶
func CleanMultiplePathSeps ¶
func EscapeFilename ¶
func ExpandIndexEscape ¶
func ExpandIndexesEscape ¶
func ExpandLastIndexEscape ¶
func IndexLineColumn ¶
Returned line/col values are one-based.
func LineColumnIndex ¶
Line/col args are one-based.
func RemoveEscapes ¶
func RemoveEscapesEscapable ¶
removes the escape only if escapable
func RemoveFilenameEscapes ¶
func RunesExcept ¶
Types ¶
type FilePos ¶
type FilePos struct {
Filename string
Offset, Len int // length after offset for a range
Line, Column int // bigger than zero to be considered
}
func NewFilePosFromResource ¶
func ParseFilePos ¶
Parse fmt: <filename:line?:col?>. Accepts escapes but doesn't unescape.
Click to show internal directories.
Click to hide internal directories.