utils

package
v0.0.0-...-4786a4a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSpecByUnstructured

func CompareSpecByUnstructured(source, target *unstructured.Unstructured) bool

func Contains

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

func Delete

func Delete(data map[string]interface{}, path string)

Delete data = {"a":{"b":{"c":123}}} Delete(data,"a.b.c") = {"a":{"b":""}}

func Get

func Get(data map[string]interface{}, path string) (value interface{})

Get data = {"a":{"b":{"c":123}}} Get(data,"a.b.c") = 123

func ObjectToUnstructured

func ObjectToUnstructured(object runtime.Object) (*unstructured.Unstructured, error)

func Set

func Set(data map[string]interface{}, path string, value interface{})

Set "path":"a.b.c" data = {"a":{"b":{"c":123}}} Set(data,"a.b.c",123)

func Sha1

func Sha1(data string) string

func ToStringArray

func ToStringArray(source interface{}) []string

func UnmarshalObject

func UnmarshalObject(object runtime.Object, target interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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