util

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtrIsNilOrFalse

func BoolPtrIsNilOrFalse(ptr *bool) bool

BoolPtrIsNilOrFalse returns true if bool pointer is nil or false, otherwise this returns false.

func BoolPtrIsTrue

func BoolPtrIsTrue(ptr *bool) bool

BoolPtrIsTrue returns true if bool pointer is true. This returns false if pointer is false or nil.

func GetIndexFromSlice

func GetIndexFromSlice(s []string, match string) int

GetIndexFromSlice returns the index of a specific string in a slice or -1 if the value is not present.

func IntsToStrings

func IntsToStrings(is []int32) (ss []string)

IntsToStrings converts an integer slice into a string slice.

func MergeStringMaps

func MergeStringMaps(src, dst map[string]string) map[string]string

MergeStringMaps merges the src map into the dst.

func ParseImageDefinition

func ParseImageDefinition(def *v1alpha1.OCIImageDefinition) (string, error)

ParseImageDefinition generates a fully-qualified image reference to an OCI image. An error will be returned when the image definition is invalid.

func RemoveFromSlice

func RemoveFromSlice(s []string, i int) []string

RemoveFromSlice removes index i from slice s. Does not maintain order of the original slice. https://stackoverflow.com/a/37335777/13979167

Types

This section is empty.

Jump to

Keyboard shortcuts

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