Documentation ¶
Overview ¶
Package tag provides functions for working with tags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( EmptyLine = Line("") EmptySet = Set{"", emptyMap} )
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func MapToSet ¶
MapToSet receives a map of values mp and returns the Set of tags, formed from there.
func ParseUnsafe ¶
ParseUnsafe expects a string in format either "{name=value,name2=value...}" or "name=value,name2=value..." and returns the Set object or an error, if any. The ParseUnsafe forms the result from the string tags, and it tries to avoid new allocations. If the passed string is not safe
The value for any tag could be in escaped (double quoted by "). This case the value can contain the following symbols '{', '}', ',', '\', '"' escaped by backslash
func (*Set) MarshalJSON ¶
MarshalJSON to support json.Marshaller interface
func (*Set) UnmarshalJSON ¶
UnmarshalJSON to support json.Unmarshaller interface