Documentation ¶
Overview ¶
Package utils holds common data structures and functions useful for working with OpenChirp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFloat64 ¶
FormatFloat64 formats the given float64 value using a dynamic precison that looks cleaner when sent back to OpenChirp
func ParseCSVConfig ¶
ParseCSVConfig parses a single config field that follows comma and optional quotes seperated syntax into it's constituent tokens Possible errors returned are from the encoding/csv package. The error can be referenced by it's concrete type *csv.ParseError, which can give useful information about where the parse error occurred. Example: errColumn := err.(*csv.ParseError).Column
func ParseOCValue ¶
func ParseOCValue(value string) interface{}
ParseOCValue tries to parse the three typical primitive data types used in OpenChirp. It first tries to parse the value as a float64. Then, it tries to parse as a bool. If all else fails, it returns the value as a string.
Types ¶
This section is empty.