utils

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToStringLower

func ConvertToStringLower(values []string) []string

ConvertToStringLower converts slice of strings to lowercase.

func FindZeroValue

func FindZeroValue(values map[string]interface{}) string

FindZeroValue finds the 1st zero value in the map.

func GetKubeAPIConfig

func GetKubeAPIConfig(kubeConfigPath string) (*rest.Config, error)

GetKubeAPIConfig returns a Kubernetes API config. Common abstraction to get config in both incluster and out cluster scenarios.

func GetKubeAPIConfigOrDie

func GetKubeAPIConfigOrDie(kubeConfigPath string) *rest.Config

GetKubeAPIConfigOrDie wrapper around GetKubeAPIConfig. Panics if unable to load config.

func IsZero

func IsZero(value interface{}) bool

IsZero checks if the provided value is its zero value

func RemoveDuplicateStrings

func RemoveDuplicateStrings(values []string) []string

RemoveDuplicateStrings returns a unique list of strings from the provided list.

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice returns true if the string is in the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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