Documentation ¶
Index ¶
- func Capitalize(s string) string
- func ComputeMD5Hash(input []byte) []byte
- func Copy(dst, src interface{})
- func CopyOf(src interface{}) (dst interface{})
- func EncodeAsString(bytes []byte) string
- func GoFmt(buf string) string
- func IsHidden(path string) bool
- func PrettyPrint(v interface{}) string
- func SetValueAtAnyPath(i interface{}, path string, v interface{})
- func SetValueAtPath(i interface{}, path string, v interface{})
- func SortXML(r io.Reader) string
- func StringValue(i interface{}) string
- func Trim(s string) string
- func ValuesAtAnyPath(i interface{}, path string) []interface{}
- func ValuesAtPath(i interface{}, path string) []interface{}
- func WalkDir(dirPth, suffix string) (files []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶ added in v1.0.21
Capitalize capitalizes the first character of the string.
func ComputeMD5Hash ¶ added in v1.2.2
func Copy ¶
func Copy(dst, src interface{})
Copy deeply copies a src structure to dst. Useful for copying request and response structures.
Can copy between structs of different type, but will only copy fields which are assignable, and exist in both structs. Fields which are not assignable, or do not exist in both structs are ignored.
func CopyOf ¶
func CopyOf(src interface{}) (dst interface{})
CopyOf returns a copy of src while also allocating the memory for dst. src must be a pointer type or this operation will fail.
func EncodeAsString ¶ added in v1.2.2
func GoFmt ¶ added in v1.0.21
GoFmt returns the Go formated string of the input.
Panics if the format fails.
func PrettyPrint ¶ added in v1.0.21
func PrettyPrint(v interface{}) string
PrettyPrint generates a human readable representation of the value v. All values of v are recursively found and pretty printed also.
func SetValueAtAnyPath ¶
func SetValueAtAnyPath(i interface{}, path string, v interface{})
SetValueAtAnyPath sets an object at the case insensitive lexical path inside of a structure
func SetValueAtPath ¶
func SetValueAtPath(i interface{}, path string, v interface{})
SetValueAtPath sets an object at the lexical path inside of a structure
func StringValue ¶
func StringValue(i interface{}) string
StringValue returns the string representation of a value.
func Trim ¶ added in v1.0.21
Trim removes all leading and trailing white space.
All consecutive spaces will be reduced to a single space.
func ValuesAtAnyPath ¶
func ValuesAtAnyPath(i interface{}, path string) []interface{}
ValuesAtAnyPath returns a list of objects at the case-insensitive lexical path inside of a structure
func ValuesAtPath ¶
func ValuesAtPath(i interface{}, path string) []interface{}
ValuesAtPath returns a list of objects at the lexical path inside of a structure
Types ¶
This section is empty.