utils

package
v0.0.0-...-85cd7ee Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As[T any](err error) (T, bool)

func Bool

func Bool(value bool) *bool

func BoolValue

func BoolValue(value *bool) bool

func ConvertInt

func ConvertInt[R Integer](value any) R

func Equals

func Equals(v1, v2 string) bool

func Getenv

func Getenv(key, default_ string) string

func Int

func Int[T Integer, R Integer](value T) *R

func IntValue

func IntValue[T Integer, R Integer](value *T) R

func IsMock

func IsMock() bool

func IsServiceMock

func IsServiceMock(serviceName ServiceName) bool

func String

func String(value string) *string

func StringValue

func StringValue(value *string) string

func Time

func Time(val time.Time) *time.Time

func ToTime

func ToTime(v string) *time.Time

func ToTimeFormat

func ToTimeFormat(t time.Time) string

Types

type Integer

type Integer interface {
	int | int32 | int64 | float32 | float64
}

type ServiceName

type ServiceName string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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