util

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, s string) bool

Contains check is a string is contained in the slice of string

func DefaultString

func DefaultString(list ...string) string

DefaultString expects multipls string args and returns the first non empty string

func GetEnvString

func GetEnvString(def string, keys ...string) string

GetEnvString - get env value of first key else default.

func MD5

func MD5(data string) string

MD5 converts string to its MD5 hash #nosec

func ToArray

func ToArray(m map[string]bool) []string

ToArray converts map[string]bool to string slice

func ToMap

func ToMap(arr []string) map[string]bool

ToMap converts string slice to map[string]bool

func UnstructuredObject

func UnstructuredObject(apiVersion string, kind string) *unstructured.Unstructured

UnstructuredObject expects apiVersiona and kind, sets them in an *unstructured.Unstructured object and returns it

Types

type SyncSteps

type SyncSteps struct {
	Add    []string
	Delete []string
	Common []string
}

SyncSteps maintains the steps intended for addition, deletion and common steps

func FindSyncSteps

func FindSyncSteps(src []string, dest []string) SyncSteps

FindSyncSteps - finds sync steps

Jump to

Keyboard shortcuts

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