utils

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertJSONRowToSlice

func ConvertJSONRowToSlice(in string) ([]string, error)

ConvertJSONRowToSlice takes a json-formatted array and returns a string slice

func JSONnumberUnmarshal

func JSONnumberUnmarshal(r io.Reader, i interface{}) error

JSONnumberUnmarshal unmarshals a json string with numbers cast as json.Number, not float64 (to avoid scientific notation on large IDs)

func ListContainsString

func ListContainsString(list []string, item string) bool

ListContainsString asserts that a string slice contains a given string

func NormalizeName

func NormalizeName(s string) string

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 StrPtr

func StrPtr(s string) *string

StrPtr returns the pointer to a string's value

func ValidString

func ValidString(field, value string) error

ValidString asserts that a string is within the minimum and maximum length configured for µtask

func ValidText

func ValidText(field, value string) error

ValidText asserts that a long text string is within the minimum and maximum length configured for µtask

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL