Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TypeUnknown is an unknown type token TypeUnknown int = iota // TypeText is a text string TypeText // TypeKey is a key string TypeKey )
Variables ¶
View Source
var Version = "v0.1.0"
Version is the formatparser's version.
Functions ¶
This section is empty.
Types ¶
type FormatPart ¶
type FormatPart struct {
// Type is the part type, it should be TypeText or TypeKey.
Type int
// Value is the string value.
Value string
}
FormatPart is a token part.
func Parse ¶
func Parse(format string) []*FormatPart
Parse parses a format string to formatted token parts.
Click to show internal directories.
Click to hide internal directories.