to

package
v0.0.0-...-1b854f1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 2 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(val *bool) bool

Bool returns bool from a bool pointer

func BoolPtr

func BoolPtr(val bool) *bool

BoolPtr returns bool pointer from a bool

func BoolString

func BoolString(val bool) string

BoolString returns string (True/False) from a bool

func Float32

func Float32(val *float32) float32

Float32 returns float32 from a float32 pointer

func Float32Ptr

func Float32Ptr(val float32) *float32

Float32Ptr returns float32 ptr from float32 value

func Float64

func Float64(val *float64) float64

Float64 returns float64 from a float64 pointer

func Float64Ptr

func Float64Ptr(val float64) *float64

Float64Ptr returns float64 pointer from float64 value

func Int

func Int(val *int) int

Int returns int from an int pointer

func Int32

func Int32(val *int32) int32

Int32 returns int32 from an int32 pointer

func Int32Ptr

func Int32Ptr(val int32) *int32

Int32Ptr returns int32 pointer from int32

func Int64

func Int64(val *int64) int64

Int64 returns int64 from an int64 pointer

func Int64Ptr

func Int64Ptr(val int64) *int64

Int64Ptr returns int64 pointer from int64 value

func IntPtr

func IntPtr(val int) *int

IntPtr returns int pointer from int value

func Number

func Number[N NumberInterface](val *N) N

Number returns number from an number pointer (generic)

func NumberPtr

func NumberPtr[N NumberInterface](val N) *N

NumberPtr returns number pointer from number (generic)

func Ptr

func Ptr[N PointerInterface](val N) *N

Ptr return the pointer from value

func Slice

func Slice[N SliceInterface](val []*N) []N

Slice returns a slice with values from a slice with pointer values

func SlicePtr

func SlicePtr[N SliceInterface](val []N) []*N

Slice returns a slice with pointer values from a slice with values

func String

func String(val *string) string

String returns a string from a string pointer

func StringLower

func StringLower(val *string) string

StringLower returns lowercased string from a string pointer

func StringMap

func StringMap(val map[string]*string) (ret map[string]string)

StringMap returns string map from a map string pointer values

func StringMapPtr

func StringMapPtr(val map[string]string) *map[string]*string

StringMapPtr returns pointer to a map with string pointers from a string map

func StringPtr

func StringPtr(val string) *string

StringPtr returns pointer from string

func UnixTime

func UnixTime(val time.Time) float64

UnixTime converts time.Time to unix timestamp (float64)

func Val

func Val[N PointerInterface](val *N) N

Val return the value from a pointer

func Value

func Value[N PointerInterface](val *N) N

Value return the value from a pointer

func ValuePtr

func ValuePtr[N PointerInterface](val N) *N

ValuePtr return the pointer from value

Types

type NumberInterface

type NumberInterface interface {
	int | int8 | int16 | int32 | int64 | float32 | float64
}

type PointerInterface

type PointerInterface interface {
	int | int8 | int16 | int32 | int64 | float32 | float64 | string | []int | []int8 | []int16 | []int32 | []int64 | []float32 | []float64 | []string
}

type SliceInterface

type SliceInterface interface {
	int | int8 | int16 | int32 | int64 | float32 | float64 | string
}

Jump to

Keyboard shortcuts

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