Documentation ¶
Index ¶
- func ConvertJSONRowToSlice(in string) ([]string, error)
- func JSONMarshal(obj interface{}) ([]byte, error)
- func JSONMarshalIndent(obj interface{}, prefix, indent string) ([]byte, error)
- func JSONnumberUnmarshal(r io.Reader, i interface{}) error
- func ListContainsString(list []string, item string) bool
- func NormalizeName(s string) string
- func PrintJSON(v interface{})
- func StrPtr(s string) *string
- func ValidString(field, value string) error
- func ValidText(field, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJSONRowToSlice ¶
ConvertJSONRowToSlice takes a json-formatted array and returns a string slice
func JSONMarshal ¶ added in v1.4.0
JSONMarshal will JSON encode a given object, without escaping HTML characters
func JSONMarshalIndent ¶ added in v1.4.0
JSONMarshalIndent will JSON encode a given object, without escaping HTML characters and indentation
func JSONnumberUnmarshal ¶
JSONnumberUnmarshal unmarshals a json string with numbers cast as json.Number, not float64 (to avoid scientific notation on large IDs)
func ListContainsString ¶
ListContainsString asserts that a string slice contains a given string
func NormalizeName ¶
NormalizeName trims leading and trailing spaces on a string, and converts its characters to lowercase
func PrintJSON ¶
func PrintJSON(v interface{})
PrintJSON prints out an interface{} as an indented json string
func ValidString ¶
ValidString asserts that a string is within the minimum and maximum length configured for µtask
Types ¶
This section is empty.