Documentation
¶
Overview ¶
Package utils provides general utility methods. The '*Ptr' functions were borrowed/inspired by the kubernetes go-client.
Index ¶
- func BoolPtr(b bool) *bool
- func BoxStaticFile(boxName string, path ...string) *packr.Box
- func CallerFileLine() (string, int)
- func CallerName(up int) string
- func CallerPath(up int) string
- func FindString(slice []string, val string) (int, bool)
- func Int64Ptr(i int64) *int64
- func RandomString(n int) string
- func ReadStaticFile(path ...string) ([]byte, error)
- func ReformatError(e string, v ...interface{}) error
- func ReplaceBytesValue(b []byte, old string, new string) []byte
- func StringPtr(s string) *string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoxStaticFile ¶ added in v0.4.0
func CallerFileLine ¶ added in v0.4.0
func CallerName ¶ added in v0.4.0
CallerName retrieves the name of the function prior to the location it is called
func CallerPath ¶ added in v0.4.0
func FindString ¶ added in v0.5.0
FindString searches a []string for a specific value
func RandomString ¶ added in v0.5.0
Generates a pseudo-random number of characters of length n
func ReadStaticFile ¶ added in v0.4.0
func ReformatError ¶ added in v0.3.0
utils.ReformatError prefixes the error string ready for logging and/or output
func ReplaceBytesValue ¶ added in v0.4.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.