Documentation
¶
Overview ¶
Package tag provides a way to parse conventionally structured struct tags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructTag ¶
type StructTag struct { // Name of the tag. This must not be unique. Name string // Values are comma separated Values []string }
A StructTag represents a conventional go struct tag, as specified by reflect.StructTag. Keep in mind that this is just a convention which is not enforced by the compiler and the spec only requires an arbitrary string literal (see https://golang.org/ref/spec#Struct_types).
type Tags ¶
type Tags []StructTag
func Parse ¶
Parse inspects the given string and returns a slice of StructTag. Because the specification does not enforce a specific format, we will never return an error. Unparseable struct tags are silently ignored. The comma separated values are trimmed.
Click to show internal directories.
Click to hide internal directories.