Documentation ¶
Index ¶
- func AppendUniq(list []string, items ...string) []string
- func ConvertJSONRowToSlice(in string) ([]string, error)
- func HasDupsArray(elements []string) bool
- func JSONMarshal(obj interface{}) ([]byte, error)
- func JSONMarshalIndent(obj interface{}, prefix, indent string) ([]byte, error)
- func JSONUseNumber(d *json.Decoder) *json.Decoder
- 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
- func ValidateTags(tags map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUniq ¶ added in v1.7.0
AppendUniq does the same thing than append but insure we have only 1 iteam of each
func ConvertJSONRowToSlice ¶
ConvertJSONRowToSlice takes a json-formatted array and returns a string slice
func HasDupsArray ¶ added in v1.6.0
HasDupsArray returns a boolean indicating if array contains duplicates
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 JSONUseNumber ¶ added in v1.6.0
JSONUseNumber returns a json decoder to use numbers while decoding json
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
func ValidText ¶
ValidText asserts that a long text string is within the minimum and maximum length configured for µtask
func ValidateTags ¶ added in v1.8.2
Types ¶
This section is empty.