utils

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package utils provides general utility methods. The '*Ptr' functions were borrowed/inspired by the kubernetes go-client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

BoolPtr returns a pointer to a bool

func BoxStaticFile added in v0.4.0

func BoxStaticFile(boxName string, path ...string) *packr.Box

func CallerFileLine added in v0.4.0

func CallerFileLine() (string, int)

func CallerName added in v0.4.0

func CallerName(up int) string

CallerName retrieves the name of the function prior to the location it is called

func CallerPath added in v0.4.0

func CallerPath(up int) string

func Int64Ptr

func Int64Ptr(i int64) *int64

Int64Ptr returns a pointer to an int64

func PanicPrecaution added in v0.4.0

func PanicPrecaution() error

Placeholder error in case function panics

func ReadStaticFile added in v0.4.0

func ReadStaticFile(path ...string) ([]byte, error)

func ReformatError added in v0.3.0

func ReformatError(e string, v ...interface{}) error

utils.ReformatError prefixes the error string ready for logging and/or output

func ReplaceBytesValue added in v0.4.0

func ReplaceBytesValue(b []byte, old string, new string) []byte

func StringPtr

func StringPtr(s string) *string

StringPtr returns a pointer to the passed string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL