utils

package
v0.0.0-...-04221e2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(str string) (string, bool)

func Find

func Find[T comparable](items []T, key string, v string) (bool, T)

func If

func If[T any](cond bool, vtrue, vfalse T) T

func IfNull

func IfNull[T comparable](defValue T, value T) T

func JsonQuery

func JsonQuery[T any](input map[string]interface{}, query string) (T, error)

func Map

func Map[T any](src []T, key func(T) string) map[string]T

func MapByteToStruct

func MapByteToStruct[T comparable](_map map[string][]byte) T

func ParseJsonFile

func ParseJsonFile[T any](path string) T

func ParseK8sResource

func ParseK8sResource[T any](path string) T

func ParseYamlFile

func ParseYamlFile[T any](path string) T

func RandomString

func RandomString(n int, r ...string) string

func ReadFile

func ReadFile(path string) []byte

func Slice

func Slice[T any](_map map[string]T) []T

func ToString

func ToString(v any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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