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 Int64Ptr(i int64) *int64
- func PanicPrecaution() error
- 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 PanicPrecaution ¶ added in v0.4.0
func PanicPrecaution() error
Placeholder error in case function panics
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.