utils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolP

func BoolP(value bool) *bool

BoolP returns a pointer of a boolean variable

func Float32P

func Float32P(value float32) *float32

Float32P returns a pointer of a float32 variable

func Float64P

func Float64P(value float64) *float64

Float64P returns a pointer of a float64 variable

func Int32P

func Int32P(value int32) *int32

Int32P returns a pointer of an int32 variable

func Int64P

func Int64P(value int64) *int64

Int64P returns a pointer of an int64 variable

func IntP

func IntP(value int) *int

IntP returns a pointer of an integer variable

func MapSliceStringP

func MapSliceStringP(value map[string][]string) *map[string][]string

func NilOrEmpty

func NilOrEmpty(value *string) bool

NilOrEmpty returns true if string is empty or has a nil value

func NilOrEmptyArray

func NilOrEmptyArray(value *[]string) bool

NilOrEmptyArray returns true if string is empty or has a nil value

func NilOrEmptySlice

func NilOrEmptySlice(value *[]string) bool

NilOrEmptySlice returns true if list is empty or has a nil value

func PBool

func PBool(value *bool) bool

PBool returns a boolean value from a pointer

func PFloat32

func PFloat32(value *float32) float32

PFloat32 returns an flaot32 value from a pointer

func PFloat64

func PFloat64(value *float64) float64

PFloat64 returns an flaot64 value from a pointer

func PInt

func PInt(value *int) int

PInt returns an integer value from a pointer

func PInt32

func PInt32(value *int32) int32

PInt32 returns an int32 value from a pointer

func PInt64

func PInt64(value *int64) int64

PInt64 returns an int64 value from a pointer

func PString

func PString(value *string) string

PString returns a string value from a pointer

func PStringSlice

func PStringSlice(value *[]string) []string

PStringSlice converts a pointer to []string or returns ampty slice if nill value

func StringP

func StringP(value string) *string

StringP returns a pointer of a string variable

func StringSliceP

func StringSliceP(value []string) (p *[]string)

StringSliceP converts a []string to pointer []string

func TimeP

func TimeP(time time.Time) *time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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