utils

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

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

func DirExists added in v0.11.0

func DirExists(path string) bool

DirExists checks if a directory exists

func FileExists

func FileExists(filepath string) bool

FileExists checks if a file exists and is not a directory

func Fill added in v0.10.0

func Fill(src interface{}, dst interface{}) error

func GetPodSource added in v0.11.0

func GetPodSource(pod *v1.Pod) (string, error)

GetPodSource returns the source of the pod based on the annotation.

func IsStaticPod added in v0.11.0

func IsStaticPod(pod *v1.Pod) bool

IsStaticPod returns true if the pod is a static pod.

func MapEqualMap

func MapEqualMap(src, dst map[string]string) bool

func PartitionName added in v0.10.0

func PartitionName(lv string) string

func SliceEqualSlice

func SliceEqualSlice(src, dst []string) bool

func SliceMergeSlice

func SliceMergeSlice(src []string, dst []string) []string

func SliceRemoveString

func SliceRemoveString(slice []string, s string) (result []string)

func SliceSubSlice

func SliceSubSlice(src []string, dst []string) []string

func UntilMaxRetry

func UntilMaxRetry(f func() error, maxRetry int, interval time.Duration) error

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