Documentation ¶
Index ¶
- Variables
- func AbsFilenameToUrl(filename string) (string, error)
- 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.ReaderAt, i int, truth bool, fn func(rune) bool, escape rune) int
- func ExpandIndexesEscape(rd iorw.ReaderAt, index int, truth bool, fn func(rune) bool, escape rune) (int, int)
- func ExpandLastIndexEscape(r iorw.ReaderAt, i int, truth bool, fn func(rune) bool, escape rune) int
- func ImproveExpandIndexEscape(r iorw.ReaderAt, i int, escape rune) int
- func IndexLineColumn(rd iorw.ReaderAt, index int) (int, int, error)
- func LineColumnIndex(rd iorw.ReaderAt, 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
- func TrimLineSpaces(str string) string
- func UrlToAbsFilename(uri string) (string, error)
- type FilePos
- type ResParser2
- type Resource
Constants ¶
This section is empty.
Variables ¶
View Source
var Escape rune = rune(osutil.EscapeRune)
View Source
var ExtraRunes = "_-~.%@&?!=#+:^" + "(){}[]<>" + "\\/" + " "
View Source
var ParseVolume bool = runtime.GOOS == "windows"
View Source
var PathExtraRunes = RunesExcept(ExtraRunes, excludeResourceRunes+ ":") // line/column
View Source
var PathSeparator rune = rune(os.PathSeparator)
View Source
var ResourceExtraRunes = RunesExcept(ExtraRunes, excludeResourceRunes)
Functions ¶
func AbsFilenameToUrl ¶
func CleanMultiplePathSeps ¶
func DetectEnvVar ¶
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 ¶
func UrlToAbsFilename ¶
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.
type ResParser2 ¶
type ResParser2 struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.