Documentation ¶
Overview ¶
Package escape provides percent and shell string escaping.
Index ¶
Constants ¶
View Source
const ( PercentFilenames = PercentStrictness("-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz") PercentDocket = PercentStrictness("+-.0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz") )
View Source
const ShellSafe = "%+,-./0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ^_abcdefghijklmnopqrstuvwxyz"
Variables ¶
This section is empty.
Functions ¶
func ForFilename ¶
ForFilename percent-encodes with a dash; its output always matches the regular expression `^[0-9A-Za-z-]*$`. ForFilename is injective.
func PercentDecode ¶
PercentDecode will upon encountering an encoding error emit utf8.RuneError and keep on going, returning a nil error iff no encoding error was encountered.
func PercentEncode ¶
func PercentEncode(strictness PercentStrictness, raw []byte) string
Types ¶
Click to show internal directories.
Click to hide internal directories.