helpers

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSlice

func FormatSlice(a []string) string

func HasDuplicates

func HasDuplicates(resources []string) bool

func InterfaceSlice

func InterfaceSlice(slice any) []any

InterfaceSlice converts any any into a []any slice

func ToPointer

func ToPointer(v any) any

ToPointer takes an any object and will return a pointer to this object if the object is not already a pointer. Otherwise, it will return the original value. It is safe to typecast the return-value of GetPointer into a pointer of the right type, except in very special cases (such as passing in nil without an explicit type)

func ToStringSliceE

func ToStringSliceE(i any) ([]string, error)

func Uint64ToInt

func Uint64ToInt(i uint64) int

func Uint64ToInt64

func Uint64ToInt64(i uint64) int64

Uint64ToInt64 if value is bigger than math.MaxInt64 return math.MaxInt64 otherwise returns original value casted to int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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