util

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 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 LogHttpRequest

func LogHttpRequest(code, url string, request *http.Request, body bool)

func LogHttpResponse

func LogHttpResponse(code, url string, response *http.Response, body bool)

func LogOnError

func LogOnError(code string, message string, err error)

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 PanicOnError

func PanicOnError(code string, message string, 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 SqlNullBool

func SqlNullBool(i interface{}) sql.NullBool

func SqlNullFloat64

func SqlNullFloat64(i interface{}) sql.NullFloat64

func SqlNullGeometry4326

func SqlNullGeometry4326(i interface{}) geom.NullGeometry4326

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