Documentation
¶
Overview ¶
Package exchange contains functions for converting between different formats.
Index ¶
- func EncodePlayText(ps schema.PatternSet) []string
- func LoadFromJSON(data interface{}, path string) error
- func LoadFromLine(path string) ([]string, error)
- func LoadPatternFile(fp string) (*schema.PatternSet, error)
- func ParseColor(raw string) (color.Color, error)
- func ParsePlayText(lines []string) (*schema.PatternSet, error)
- func SaveAsJSON(data interface{}, path string) error
- func SaveAsLine(data []string, path string) error
- func SetLog(l *zap.SugaredLogger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePlayText ¶
func EncodePlayText(ps schema.PatternSet) []string
EncodePlayText encodes a pattern set into a slice of strings in play.txt format.
func LoadFromJSON ¶
LoadFromJSON loads data from JSON file.
func LoadFromLine ¶
LoadFromLine loads lines of text from the given path.
func LoadPatternFile ¶
func LoadPatternFile(fp string) (*schema.PatternSet, error)
LoadPatternFile loads a pattern file from the given path.
func ParseColor ¶
ParseColor parses a natural language query string into a color.Color object.
func ParsePlayText ¶
func ParsePlayText(lines []string) (*schema.PatternSet, error)
ParsePlayText parses a slice of strings in play.txt format into a pattern set.
func SaveAsJSON ¶
SaveAsJSON saves data as JSON to the given path.
func SaveAsLine ¶
SaveAsLine saves lines of text to the given path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.