utils

package
v0.0.0-...-7d5947c Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenNumbers

func GenNumbers(n uint8) string

func GenString

func GenString(n uint8) string

func GetEnv

func GetEnv(key string, fallback string) string

func GetEnvOr

func GetEnvOr(key string, fallback func() string) string

func GetTotalHoursInAMonth

func GetTotalHoursInAMonth(year int, month int) int

func GetValidationErrors

func GetValidationErrors(err error) []domain.ErrorDetail

func IsFQDN

func IsFQDN(input string) bool

func MapValue

func MapValue[T Number](x, inMin, inMax, outMin, outMax T) T

func ParseUrlFriendly

func ParseUrlFriendly(value string) string

func PrintError

func PrintError(err error) string

func PrintErrorAnd

func PrintErrorAnd(err error, message string) string

func PrintErrorMsg

func PrintErrorMsg(err error, message string)

func SplitCommand

func SplitCommand(command string) []string

func TypeConverter

func TypeConverter[R any](data any) (*R, error)

Types

type Number

type Number interface {
	uint | int | int32 | int64 | float32 | float64
}

Jump to

Keyboard shortcuts

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