utils

package
v1.0.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package utils implements some utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DifferenceOfIntSlices

func DifferenceOfIntSlices(a, b []int) (onlyInA []int, onlyInB []int)

DifferenceOfIntSlices returns the elements in `a` that aren't in `b` as well as elements of `a` not in `b`.

func DifferenceOfStringSlices

func DifferenceOfStringSlices(a, b []string) (onlyInA []string, onlyInB []string)

DifferenceOfStringSlices returns the elements in `a` that aren't in `b` as well as elements of `a` not in `b`.

func GenerateName

func GenerateName(name *string, fallback string) string

GenerateName takes a name as string pointer. It returns name if pointer is not nil, otherwise it returns fallback with random suffix.

func GetDefaultLogger

func GetDefaultLogger(logLevel string) logr.Logger

GetDefaultLogger returns a default zapr logger.

func LabelsToLabelSelector

func LabelsToLabelSelector(labels map[string]string) string

LabelsToLabelSelector is converting a map of labels to HCloud label selector.

Types

This section is empty.

Jump to

Keyboard shortcuts

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