Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EscapeHTML = places.ReplaceStringFunc(html.EscapeString) EscapeUrl = places.ReplaceStringFunc(url.QueryEscape) EscapeNot = places.ReplaceStringFunc(places.Echo) )
View Source
var ErrInvalidPrefix = errors.New("prefix does not match the regular expression ^[a-z]+$")
Functions ¶
func SplitPrefix ¶
SplitPrefix splits the given input and returns the prefix and rest. If the first character is a minus sign ("-") then everything that follows up to the next whitespace ("\s") is considered to be the prefix and everything following that whitespace is considered to be the rest If the first character is no minus sign, the prefix is empty and the rest equals the input. If input is the empty string or just the minus sign, prefix and rest are empty strings.
Types ¶
type ErrMapperAlreadyExists ¶
type ErrMapperAlreadyExists string
func (ErrMapperAlreadyExists) Error ¶
func (me ErrMapperAlreadyExists) Error() string
type Wrapper ¶
type Wrapper interface {
places.Replacer
// Add registers a mapper in the registry for the given key
Add(key string, m places.Replacer) error
// Wrap wraps the outer mapping around the inner replacer
Wrap(inner places.Replacer) places.Replacer
}
Wrapper is a registry of places.Mappers and can wrap a mapper by escaping values
func NewConcurrent ¶
NewConcurrent returns a new Map that is safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.