Documentation
¶
Index ¶
- Variables
- func CLen(n []byte) int
- func CTrim(str string) string
- func CopyStruct(src, dest interface{}, override bool) error
- 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 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 MapStructKeys(obj interface{}, input interface{}, tag ...string) ([]string, error)
- func Max(x, y int) int
- func MaxInt64(x, y int64) int64
- func MaxInt64Ptr(x, y int64) *int64
- func MergeStringMaps(dst, src map[string]string)
- func Min(x, y int) int
- func MinInt64(x, y int64) int64
- func MinInt64Ptr(x, y int64) *int64
- func NormalizeMap(m map[string]interface{}, omitempty ...bool) map[string]interface{}
- func OpenFileReverse(name string) (*os.File, error)
- func ParsePKCS12Certificate(certData []byte, password ...string) ([]byte, []byte, error)
- func PrettyPrint(v interface{}) (err error)
- func PrettySprint(v interface{}) string
- func ProperTitle(input string) string
- func RandomString(n int) string
- func RemoveWhitespace(input string) string
- func ReverseWalk(start string, walk filepath.WalkFunc) error
- func Slug(val string) string
- func StringMap(obj interface{}) map[string]string
- func StringRemove(s []string, r string) []string
- func StructMap(obj interface{}, tag ...string) map[string]interface{}
- func SubKeys(key string) []string
- func ToSlice(v interface{}) []interface{}
- func Unquote(s string) string
Constants ¶
This section is empty.
Variables ¶
var ( // ErrExpired is returned when an apns cert is no longer valid ErrExpired = errors.New("certificate has expired or is not yet valid") // ErrFailedToDecryptKey is returned when the ssl key cannot be decryped ErrFailedToDecryptKey = errors.New("failed to decrypt private key") // ErrFailedToParsePrivateKey is returned when the ssl private key cannot be parsed ErrFailedToParsePrivateKey = errors.New("failed to parse private key") )
var FlattenSeparator = "."
FlattenSeparator is what is used by flatten to separate segments
Functions ¶
func CopyStruct ¶
CopyStruct copies from one struct to another
func ExpandPrefixed ¶
func ExpandPrefixedToResult ¶
func FileBaseName ¶
FileBaseName returs a path without the extention
func FindFileReverse ¶
FindFileReverse will find an absolute path for a file, from cwd
func FlattenPrefixed ¶
func FlattenPrefixedToResult ¶
func MapStringToInterface ¶
func MapStructKeys ¶ added in v1.3.2
MapStructKeys maps the struct into the interface returning keys mapped
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 ParsePKCS12Certificate ¶ added in v1.4.1
ParsePKCS12Certificate parses a PKCS12 certificate and returns the public key and the certificate
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 RandomString ¶ added in v1.3.2
RandomString returns a random string
func RemoveWhitespace ¶
RemoveWhitespace removes all whitespace from a string
func ReverseWalk ¶
ReverseWalk walks up a path
func StringRemove ¶ added in v1.4.8
StringRemove removes a string from a string slice
func SubKeys ¶
SubKeys splits a dot notation key into sub-parsts, i.e. foo.bar.baz returns []string{ "foo", "foo.bar", "foo.bar.baz" }
Types ¶
This section is empty.