util

package
v0.0.0-...-65deff2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBool

func DefaultBool(i interface{}, fallback bool) bool

func DefaultFloat

func DefaultFloat(i interface{}, fallback float64) float64

func DefaultInt

func DefaultInt(i interface{}, fallback int64) int64

func DefaultString

func DefaultString(i interface{}, fallback string) string

func DefaultTime

func DefaultTime(i interface{}, fallback time.Time) time.Time

func GetEnv

func GetEnv(key, fallback string) string

func GetEnvBool

func GetEnvBool(key string, fallback bool) bool

func GetEnvFloat64

func GetEnvFloat64(key string, fallback float64) float64

func GetEnvInt32

func GetEnvInt32(key string, fallback int32) int32

func LogDebug

func LogDebug(msg string)

func LogError

func LogError(msg string, err error)

func NewTimeUTC

func NewTimeUTC() time.Time

func NilBool

func NilBool(i interface{}) *bool

func NilFloat64

func NilFloat64(i interface{}) *float64

func NilInt

func NilInt(i interface{}) *int

func NilInt16

func NilInt16(i interface{}) *int16

func NilInt32

func NilInt32(i interface{}) *int32

func NilInt64

func NilInt64(i interface{}) *int64

func NilString

func NilString(i interface{}) *string

func NilTime

func NilTime(t time.Time) *time.Time

func OnErrorPanic

func OnErrorPanic(err error)

func ParseBool

func ParseBool(value string, fallback bool) bool

func ParseFloat64

func ParseFloat64(str string, fallback float64) float64

func ParseInt32

func ParseInt32(str string, fallback int32) int32

func ParseInt64

func ParseInt64(str string, fallback int64) int64

func ParseTime

func ParseTime(str string, fallback *time.Time) *time.Time

func RandomString

func RandomString(length int) string

func ResolveFromFile

func ResolveFromFile(base64Value, filePath string) ([]byte, error)

func SqlNullBool

func SqlNullBool(i interface{}) sql.NullBool

func SqlNullFloat64

func SqlNullFloat64(i interface{}) sql.NullFloat64

func SqlNullInt32

func SqlNullInt32(i interface{}) sql.NullInt32

func SqlNullInt64

func SqlNullInt64(i interface{}) sql.NullInt64

func SqlNullString

func SqlNullString(i interface{}) sql.NullString

func SqlNullTime

func SqlNullTime(i interface{}) sql.NullTime

func SqlNullZeroInt64

func SqlNullZeroInt64(i interface{}) sql.NullInt64

func StringsContainString

func StringsContainString(strings []*string, str string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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