baseutils

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLogLevel = 1
	TraceLogLevel = 2
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, str string) bool

func ConvertMultilineEntrypoint

func ConvertMultilineEntrypoint(entrypoint string, isRayJob bool) interface{}

func Debug

func Debug(logger logr.Logger, fmt string, keysAndValues ...any)

func FormatNameWithPostfix

func FormatNameWithPostfix(name string, postfix ...string) string

func GetCurrentUser

func GetCurrentUser() (string, error)

func GetEnv

func GetEnv(key, defaultValue string) string

func GetGVK

func GetGVK(scheme runtime.Scheme, object client.Object) (schema.GroupVersionKind, error)

func LogErrorf

func LogErrorf(logger logr.Logger, message string, err error) error

LogErrorf takes care of logging the error message with logr, as well as creating the error object to return

func MakeRFC1123Compliant

func MakeRFC1123Compliant(input string) string

func Pointer

func Pointer[T any](d T) *T

func RemoveString

func RemoveString(slice []string, str string) []string

func Trace

func Trace(logger logr.Logger, fmt string, keysAndValues ...any)

func ValueOrDefault

func ValueOrDefault[T any](d *T) T

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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