utils

package
v0.1.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout  = time.Second * 5
	DefaultDuration = time.Second * 5
)

Variables

View Source
var (
	Version   = "v0.1.0-rc"
	GitCommit = ""
)
View Source
var (
	ErrWaitForCompleteTimeout = errors.New("wait for complete timeout")
)

Functions

func GetPtr

func GetPtr[T valueTypes](i T) *T

GetPtr gets the pointer of the variable

func GetValue

func GetValue[T valueTypes](p *T) T

GetPtr is a safe function to get the data from the pointer

func Parse

func Parse(ref string) (namespace string, name string)

func PrintObject

func PrintObject(a any) string

func RandomString

func RandomString(length int) string

RandomString generates a hexadecimal random number

func WaitForCompleteWithError

func WaitForCompleteWithError(f func() error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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