Documentation ¶
Index ¶
- Constants
- func BuildCommandURL(f interface{}) string
- func Check(errorList *[]string, isValid bool, errMsg string, args ...interface{})
- func Contains(str string, list []string) bool
- func SetValueIfTagExists(f interface{}, actTag string, setVal string)
- func TagExists(f interface{}, actTag string) bool
- func ValidateSingleChar(input string) bool
Constants ¶
View Source
const (
TagName = "json" //json tag
)
Json TagName
Variables ¶
This section is empty.
Functions ¶
func BuildCommandURL ¶
func BuildCommandURL(f interface{}) string
BuildCommandURL creates the rest url depending the given command options (interface)
func Check ¶
Check can be used for the validation of any expression which returns a boolean (isValid) Example: Check(&myErrorList, x.Y >= 0, "want positive Y, got %d", x.Y)
func Contains ¶ added in v0.0.2
Contains tests if an array contains a certain value, Spaces will be trimed
func SetValueIfTagExists ¶
SetValueIfTagExists set a value if a given "json" tag exists in the given interface
func ValidateSingleChar ¶
ValidateSingleChar validates a string if containing only a single char
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.