Documentation
¶
Index ¶
- func Bool(val interface{}, def ...bool) *bool
- func CopyStruct(src, dest interface{}, override bool) error
- func Duration(val interface{}) *time.Duration
- func EnvMap(prefix ...string) map[string]interface{}
- func Expand(value map[string]interface{}) map[string]interface{}
- func ExpandPrefixed(value map[string]interface{}, prefix string) map[string]interface{}
- func ExpandPrefixedToResult(value map[string]interface{}, prefix string, result map[string]interface{})
- func FileBaseName(name string) string
- func FindFileReverse(name string) (string, error)
- func Flatten(value interface{}, tags ...string) map[string]interface{}
- func FlattenPrefixed(value interface{}, prefix string, tags ...string) map[string]interface{}
- func FlattenPrefixedToResult(value interface{}, prefix string, m map[string]interface{}, tags []string)
- func Float64(val interface{}) *float64
- func Int64(val interface{}) *int64
- func KVMap(vals string, sep ...string) map[string]string
- func MapPairs(cols []string, vals []interface{}, p ...string) map[string]interface{}
- func MapSeries(cols []string, values [][]interface{}, prefix ...string) []map[string]interface{}
- func MapStringToInterface(val map[string]string) map[string]interface{}
- func MapStruct(obj interface{}, input interface{}, tag ...string) error
- func MaxInt64(x, y int64) int64
- func MaxInt64Ptr(x, y int64) *int64
- func MergeStringMaps(dst, src map[string]string)
- func MinInt64(x, y int64) int64
- func MinInt64Ptr(x, y int64) *int64
- func NormalizeMap(m map[string]interface{}) map[string]interface{}
- func OpenFileReverse(name string) (*os.File, error)
- func PrettyPrint(v interface{}) (err error)
- func PrettySprint(v interface{}) string
- func ProperTitle(input string) string
- func RemoveWhitespace(input string) string
- func ReverseWalk(start string, walk filepath.WalkFunc) error
- func SliceToMap(s interface{}, filter ...MapFilter) map[string]interface{}
- func String(val interface{}) *string
- func StringFilter(ss []string, p func(string) string) []string
- func StringMap(obj interface{}) map[string]string
- func StringPtr(val interface{}, term ...string) string
- func StructMap(obj interface{}, tag ...string) map[string]interface{}
- func SubKeys(key string) []string
- type Int64Slicer
- type MapFilter
- type Slicer
- type StrMap
- type StrSlicer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyStruct ¶
CopyStruct copies from one struct to another
func ExpandPrefixed ¶
func ExpandPrefixedToResult ¶
func FileBaseName ¶
func FindFileReverse ¶
FindFileReverse will find an absolute path for a file, from cwd
func FlattenPrefixed ¶
func FlattenPrefixedToResult ¶
func MapStringToInterface ¶
func MaxInt64Ptr ¶
MaxInt64Ptr returns the pointer to the min of two int64 values
func MergeStringMaps ¶
func MinInt64Ptr ¶
MinInt64Ptr returns the pointer to the min of two int64 values
func NormalizeMap ¶
NormalizeMap normalizes the map values to non-pointer types
func OpenFileReverse ¶
OpenFileReverse find and open a file in reverse
func PrettyPrint ¶
func PrettyPrint(v interface{}) (err error)
func PrettySprint ¶
func PrettySprint(v interface{}) string
func ProperTitle ¶
ProperTitle handles properly title casing a string
func RemoveWhitespace ¶
RemoveWhitespace removes all whitespace from a string
func ReverseWalk ¶
ReverseWalk walks up a path
func SliceToMap ¶
SliceToMap converts a slice to a map
func StringFilter ¶
StringFilter filters a string
Types ¶
type Int64Slicer ¶
type Int64Slicer interface {
ContainsAll(values ...int64) bool
ContainsAny(values ...int64) bool
Remove(r int64) Int64Slicer
Slice() []int64
}
Int64Slicer is the sprocket Int64Slicer interface
type Slicer ¶
type Slicer interface {
ContainsAll(values ...interface{}) bool
ContainsAny(values ...interface{}) bool
Remove(r interface{}) Int64Slicer
Slice() interface{}
}
Slicer is a generic slice manipulation interface helper
Click to show internal directories.
Click to hide internal directories.