util

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvDuration

func GetEnvDuration(key string, def time.Duration) time.Duration

func GetFuncName added in v0.0.56

func GetFuncName(i interface{}) string

func IgnoreAlreadyExists

func IgnoreAlreadyExists(err error) error

func IgnoreConflict

func IgnoreConflict(err error) error

func IgnoreContainerNotFound

func IgnoreContainerNotFound(err error) error

func IgnoreExist

func IgnoreExist(err error) error

func IgnoreNotFound

func IgnoreNotFound(err error) error

func IgnorePermission

func IgnorePermission(err error) error

func IsPrint

func IsPrint(x string) bool

func MustHash

func MustHash(v interface{}) string

func MustJSON

func MustJSON(in interface{}) string

func MustUnJSON

func MustUnJSON(v interface{}, in interface{})

MustUnJSON unmarshalls JSON or panics. v - must be []byte or string in - must be a pointer

func NewLogger added in v0.0.38

func NewLogger() logr.Logger

func NotEqual

func NotEqual(a, b interface{}) (notEqual bool, patch string)

func Printable

func Printable(x string) string

return a printable string

func RandString added in v0.0.30

func RandString() string

func ReadFile

func ReadFile(filename string) (*unstructured.UnstructuredList, error)

func Resource

func Resource(kind string) string

func SplitYAML

func SplitYAML(v interface{}) (*unstructured.UnstructuredList, error)

Types

type FileInfoUnstructuredList

type FileInfoUnstructuredList struct {
	fs.FileInfo
	unstructured.UnstructuredList
}

func ReadDir

func ReadDir(dirname string) ([]FileInfoUnstructuredList, error)

Jump to

Keyboard shortcuts

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