utils

package
v0.4.0-prerelease.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdHelp

func CmdHelp(cmd *cobra.Command, _ []string)

CmdHelp is used to explicitly set the Run function for non-leaf commands to the command help function, so that we can catch invalid commands This is a workaround needed due to the open issue on the Cobra repo: https://github.com/spf13/cobra/issues/706

func ConvertInt64PToFloat64P added in v0.2.3

func ConvertInt64PToFloat64P(i *int64) *float64

ConvertInt64PToFloat64P converts an int64 pointer to a float64 pointer This function will return nil if the input is nil

func Float64Ptr added in v0.2.3

func Float64Ptr(f float64) *float64

Float64Ptr returns a pointer to a float64 Needed because the Ptr function only returns pointer to float

func Int64Ptr added in v0.2.3

func Int64Ptr(i int64) *int64

Int64Ptr returns a pointer to an int64 Needed because the Ptr function only returns pointer to int

func Ptr

func Ptr[T any](v T) *T

Ptr Returns the pointer to any type T

func ValidateUUID

func ValidateUUID(value string) error

ValidateUUID validates if the provided string is a valid UUID

Types

This section is empty.

Jump to

Keyboard shortcuts

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