ptr

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to a boolean

func Byte

func Byte(v byte) *byte

Byte returns a pointer to a byte

func Complex128

func Complex128(v complex128) *complex128

Complex128 returns a pointer to a 128-bit complex number

func Complex64

func Complex64(v complex64) *complex64

Complex64 returns a pointer to a 64-bit complex number

func Date

func Date(v connection.Date) *connection.Date

Date returns a pointer to a Date

func DateTime

DateTime returns a pointer to a DateTime

func Float32

func Float32(v float32) *float32

Float32 returns a pointer to a 32-bit floating-point number

func Float64

func Float64(v float64) *float64

Float64 returns a pointer to a 64-bit floating-point number

func IPAddress

IPAddress returns a pointer to a IPAddress

func Int

func Int(v int) *int

Int returns a pointer to an integer

func Int16

func Int16(v int16) *int16

Int16 returns a pointer to a 16-bit integer

func Int32

func Int32(v int32) *int32

Int32 returns a pointer to a 32-bit integer

func Int64

func Int64(v int64) *int64

Int64 returns a pointer to a 64-bit integer

func Int8

func Int8(v int8) *int8

Int8 returns a pointer to an 8-bit integer

func String

func String(v string) *string

String returns a pointer to a string

func ToBoolOrDefault

func ToBoolOrDefault(b *bool) bool

ToBoolOrDefault is a helper method for retrieving a boolean from a pointer to a boolean value (or zero value if nil)

func ToComplex128OrDefault

func ToComplex128OrDefault(i *complex128) complex128

ToComplex128OrDefault is a helper method for retrieving a 128-bit complex number from a pointer to an complex number value (or zero value if nil)

func ToComplex64OrDefault

func ToComplex64OrDefault(i *complex64) complex64

ToComplex64OrDefault is a helper method for retrieving a 64-bit complex number from a pointer to an complex number value (or zero value if nil)

func ToDateOrDefault

func ToDateOrDefault(d *connection.Date) connection.Date

ToDateOrDefault is a helper method for retrieving a Date from a pointer to a Date value (or zero value if nil)

func ToDateTimeOrDefault

func ToDateTimeOrDefault(d *connection.DateTime) connection.DateTime

ToDateTimeOrDefault is a helper method for retrieving a DateTime from a pointer to a DateTime value (or zero value if nil)

func ToFloat32OrDefault

func ToFloat32OrDefault(i *float32) float32

ToFloat32OrDefault is a helper method for retrieving a 32-bit floating-point number from a pointer to an floating-point number value (or zero value if nil)

func ToFloat64OrDefault

func ToFloat64OrDefault(i *float64) float64

ToFloat64OrDefault is a helper method for retrieving a 64-bit floating-point number from a pointer to an floating-point number value (or zero value if nil)

func ToIPAddressOrDefault

func ToIPAddressOrDefault(i *connection.IPAddress) connection.IPAddress

ToIPAddressOrDefault is a helper method for retrieving an IPAddress from a pointer to an IPAddress value (or zero value if nil)

func ToInt16OrDefault

func ToInt16OrDefault(i *int16) int16

ToInt16OrDefault is a helper method for retrieving a 16-bit integer from a pointer to an integer value (or zero value if nil)

func ToInt32OrDefault

func ToInt32OrDefault(i *int32) int32

ToInt32OrDefault is a helper method for retrieving a 32-bit integer from a pointer to an integer value (or zero value if nil)

func ToInt64OrDefault

func ToInt64OrDefault(i *int64) int64

ToInt64OrDefault is a helper method for retrieving a 64-bit integer from a pointer to an integer value (or zero value if nil)

func ToInt8OrDefault

func ToInt8OrDefault(i *int8) int8

ToInt8OrDefault is a helper method for retrieving an 8-bit integer from a pointer to an integer value (or zero value if nil)

func ToIntOrDefault

func ToIntOrDefault(i *int) int

ToIntOrDefault is a helper method for retrieving an integer from a pointer to an integer value (or zero value if nil)

func ToStringOrDefault

func ToStringOrDefault(s *string) string

ToStringOrDefault is a helper method for retrieving a string from a pointer to a string value (or zero value if nil)

func ToUInt16OrDefault

func ToUInt16OrDefault(i *uint16) uint16

ToUInt16OrDefault is a helper method for retrieving a 16-bit unsigned integer from a pointer to an integer value (or zero value if nil)

func ToUInt32OrDefault

func ToUInt32OrDefault(i *uint32) uint32

ToUInt32OrDefault is a helper method for retrieving a 32-bit unsigned integer from a pointer to an integer value (or zero value if nil)

func ToUInt64OrDefault

func ToUInt64OrDefault(i *uint64) uint64

ToUInt64OrDefault is a helper method for retrieving a 64-bit unsigned integer from a pointer to an integer value (or zero value if nil)

func ToUInt8OrDefault

func ToUInt8OrDefault(i *uint8) uint8

ToUInt8OrDefault is a helper method for retrieving an 8-bit unsigned integer from a pointer to an integer value (or zero value if nil)

func ToUIntOrDefault

func ToUIntOrDefault(i *uint) uint

ToUIntOrDefault is a helper method for retrieving an unsigned integer from a pointer to an integer value (or zero value if nil)

func ToUIntPtrOrDefault

func ToUIntPtrOrDefault(i *uintptr) uintptr

ToUIntPtrOrDefault is a helper method for retrieving an unsigned integer from a pointer to an integer value (or zero value if nil)

func UInt

func UInt(v uint) *uint

UInt returns a pointer to an unsigned integer

func UInt16

func UInt16(v uint16) *uint16

UInt16 returns a pointer to a 16-bit unsigned integer

func UInt32

func UInt32(v uint32) *uint32

UInt32 returns a pointer to a 32-bit unsigned integer

func UInt64

func UInt64(v uint64) *uint64

UInt64 returns a pointer to a 64-bit unsigned integer

func UInt8

func UInt8(v uint8) *uint8

UInt8 returns a pointer to an 8-bit unsigned integer

func UIntPtr

func UIntPtr(v uintptr) *uintptr

UIntPtr returns a pointer to an unsigned integer

Types

This section is empty.

Jump to

Keyboard shortcuts

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