pointer

package
v0.0.0-...-b628505 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBoolPointer

func FromBoolPointer(boolPointer *bool) bool

FromBoolPointer 获取布尔指针实际指向的值,如果指针为nil的话则返回false

func FromBoolPointerOrDefault

func FromBoolPointerOrDefault(boolPointer *bool, defaultValue bool) bool

FromBoolPointerOrDefault 获取布尔指针实际指向的值,如果指针为nil的话则返回defaultValue

func FromBytePointer

func FromBytePointer(p *byte) byte

FromBytePointer 获取*byte类型的指针的实际值,如果指针为nil的话则返回0

func FromBytePointerOrDefaultIfNil

func FromBytePointerOrDefaultIfNil(v *byte, defaultValue byte) byte

FromBytePointerOrDefaultIfNil 获取*byte类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromComplex128Pointer

func FromComplex128Pointer(p *complex128) complex128

FromComplex128Pointer 获取*complex128类型的指针的实际值,如果指针为nil的话则返回0

func FromComplex128PointerOrDefaultIfNil

func FromComplex128PointerOrDefaultIfNil(v *complex128, defaultValue complex128) complex128

FromComplex128PointerOrDefaultIfNil 获取*complex128类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromComplex64Pointer

func FromComplex64Pointer(p *complex64) complex64

FromComplex64Pointer 获取*complex64类型的指针的实际值,如果指针为nil的话则返回0

func FromComplex64PointerOrDefaultIfNil

func FromComplex64PointerOrDefaultIfNil(v *complex64, defaultValue complex64) complex64

FromComplex64PointerOrDefaultIfNil 获取*complex64类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromDurationPointer

func FromDurationPointer(p *time.Duration) time.Duration

FromDurationPointer 获取*time.Duration类型的指针的实际值,如果指针为nil的话则返回0

func FromDurationPointerOrDefaultIfNil

func FromDurationPointerOrDefaultIfNil(v *time.Duration, defaultValue time.Duration) time.Duration

FromDurationPointerOrDefaultIfNil 获取*time.Duration类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromFloat32Pointer

func FromFloat32Pointer(p *float32) float32

FromFloat32Pointer 获取*float32类型的指针的实际值,如果指针为nil的话则返回0

func FromFloat32PointerOrDefaultIfNil

func FromFloat32PointerOrDefaultIfNil(v *float32, defaultValue float32) float32

FromFloat32PointerOrDefaultIfNil 获取*float32类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromFloat64Pointer

func FromFloat64Pointer(p *float64) float64

FromFloat64Pointer 获取*float64类型的指针的实际值,如果指针为nil的话则返回0

func FromFloat64PointerOrDefaultIfNil

func FromFloat64PointerOrDefaultIfNil(v *float64, defaultValue float64) float64

FromFloat64PointerOrDefaultIfNil 获取*float64类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromInt16Pointer

func FromInt16Pointer(p *int16) int16

FromInt16Pointer 获取*int16类型的指针的实际值,如果指针为nil的话则返回0

func FromInt16PointerOrDefaultIfNil

func FromInt16PointerOrDefaultIfNil(v *int16, defaultValue int16) int16

FromInt16PointerOrDefaultIfNil 获取*int16类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromInt32Pointer

func FromInt32Pointer(p *int32) int32

FromInt32Pointer 获取*int32类型的指针的实际值,如果指针为nil的话则返回0

func FromInt32PointerOrDefaultIfNil

func FromInt32PointerOrDefaultIfNil(v *int32, defaultValue int32) int32

FromInt32PointerOrDefaultIfNil 获取*int32类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromInt64Pointer

func FromInt64Pointer(p *int64) int64

FromInt64Pointer 获取*int64类型的指针的实际值,如果指针为nil的话则返回0

func FromInt64PointerOrDefaultIfNil

func FromInt64PointerOrDefaultIfNil(v *int64, defaultValue int64) int64

FromInt64PointerOrDefaultIfNil 获取*int64类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromInt8Pointer

func FromInt8Pointer(p *int8) int8

FromInt8Pointer 获取*int8类型的指针的实际值,如果指针为nil的话则返回0

func FromInt8PointerOrDefaultIfNil

func FromInt8PointerOrDefaultIfNil(v *int8, defaultValue int8) int8

FromInt8PointerOrDefaultIfNil 获取*int8类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromIntPointer

func FromIntPointer(p *int) int

FromIntPointer 获取*int类型的指针的实际值,如果指针为nil的话则返回0

func FromIntPointerOrDefaultIfNil

func FromIntPointerOrDefaultIfNil(v *int, defaultValue int) int

FromIntPointerOrDefaultIfNil 获取*int类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromRunePointer

func FromRunePointer(p *rune) rune

FromRunePointer 获取*rune类型的指针的实际值,如果指针为nil的话则返回0

func FromRunePointerOrDefaultIfNil

func FromRunePointerOrDefaultIfNil(v *rune, defaultValue rune) rune

FromRunePointerOrDefaultIfNil 获取*rune类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromStringPointer

func FromStringPointer(p *string) string

FromStringPointer 获取*string类型的指针的实际值,如果指针为nil的话则返回空字符串

func FromStringPointerOrDefaultIfNil

func FromStringPointerOrDefaultIfNil(v *string, defaultValue string) string

FromStringPointerOrDefaultIfNil 获取*string类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromTimePointer

func FromTimePointer(t *time.Time) time.Time

FromTimePointer 从time.Time类型的指针中读取时间,如果为空指针,则读取到零值

func FromTimePointerOrDefault

func FromTimePointerOrDefault(t *time.Time, defaultValue time.Time) time.Time

FromTimePointerOrDefault 从time.Time类型的指针中读取时间,如果为空指针,则返回defaultValue

func FromUint16Pointer

func FromUint16Pointer(p *uint16) uint16

FromUint16Pointer 获取*uint16类型的指针的实际值,如果指针为nil的话则返回0

func FromUint16PointerOrDefaultIfNil

func FromUint16PointerOrDefaultIfNil(v *uint16, defaultValue uint16) uint16

FromUint16PointerOrDefaultIfNil 获取*uint16类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromUint32Pointer

func FromUint32Pointer(p *uint32) uint32

FromUint32Pointer 获取*uint32类型的指针的实际值,如果指针为nil的话则返回0

func FromUint32PointerOrDefaultIfNil

func FromUint32PointerOrDefaultIfNil(v *uint32, defaultValue uint32) uint32

FromUint32PointerOrDefaultIfNil 获取*uint32类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromUint64Pointer

func FromUint64Pointer(p *uint64) uint64

FromUint64Pointer 获取*uint64类型的指针的实际值,如果指针为nil的话则返回0

func FromUint64PointerOrDefaultIfNil

func FromUint64PointerOrDefaultIfNil(v *uint64, defaultValue uint64) uint64

FromUint64PointerOrDefaultIfNil 获取*uint64类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromUint8Pointer

func FromUint8Pointer(p *uint8) uint8

FromUint8Pointer 获取*uint8类型的指针的实际值,如果指针为nil的话则返回0

func FromUint8PointerOrDefaultIfNil

func FromUint8PointerOrDefaultIfNil(v *uint8, defaultValue uint8) uint8

FromUint8PointerOrDefaultIfNil 获取*uint8类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromUintPointer

func FromUintPointer(p *uint) uint

FromUintPointer 获取*uint类型的指针的实际值,如果指针为nil的话则返回0

func FromUintPointerOrDefaultIfNil

func FromUintPointerOrDefaultIfNil(v *uint, defaultValue uint) uint

FromUintPointerOrDefaultIfNil 获取*uint类型的指针的实际值,如果指针为nil的话则返回defaultValue

func FromUintptrPointer

func FromUintptrPointer(p *uintptr) uintptr

FromUintptrPointer 获取*uintptr类型的指针的实际值,如果指针为nil的话则返回0

func FromUintptrPointerOrDefaultIfNil

func FromUintptrPointerOrDefaultIfNil(v *uintptr, defaultValue uintptr) uintptr

FromUintptrPointerOrDefaultIfNil 获取*uintptr类型的指针的实际值,如果指针为nil的话则返回defaultValue

func NowTimePointer

func NowTimePointer() *time.Time

NowTimePointer 返回当前时间的指针表示形式 *time.Time

func ToBoolPointer

func ToBoolPointer(boolValue bool) *bool

ToBoolPointer 将布尔变量转换为布尔指针

func ToBoolPointerOrNilIfFalse

func ToBoolPointerOrNilIfFalse(boolValue bool) *bool

ToBoolPointerOrNilIfFalse 将布尔变量转换为布尔类型的指针,如果变量的值为false的话则转换为nil指针

func ToBytePointer

func ToBytePointer(v byte) *byte

ToBytePointer 将byte类型的变量转换为对应的*byte指针类型

func ToBytePointerOrNilIfZero

func ToBytePointerOrNilIfZero(v byte) *byte

ToBytePointerOrNilIfZero 将byte类型的变量转换为对应的*byte指针类型,如果变量的值为0的话则返回nil指针

func ToComplex128Pointer

func ToComplex128Pointer(v complex128) *complex128

ToComplex128Pointer 将complex128类型的变量转换为对应的*complex128指针类型

func ToComplex128PointerOrNilIfZero

func ToComplex128PointerOrNilIfZero(v complex128) *complex128

ToComplex128PointerOrNilIfZero 将complex128类型的变量转换为对应的*complex128指针类型,如果变量的值为0的话则返回nil指针

func ToComplex64Pointer

func ToComplex64Pointer(v complex64) *complex64

ToComplex64Pointer 将complex64类型的变量转换为对应的*complex64指针类型

func ToComplex64PointerOrNilIfZero

func ToComplex64PointerOrNilIfZero(v complex64) *complex64

ToComplex64PointerOrNilIfZero 将complex64类型的变量转换为对应的*complex64指针类型,如果变量的值为0的话则返回nil指针

func ToDurationPointer

func ToDurationPointer(v time.Duration) *time.Duration

ToDurationPointer 将time.Duration类型的变量转换为对应的*time.Duration指针类型

func ToDurationPointerOrNilIfZero

func ToDurationPointerOrNilIfZero(v time.Duration) *time.Duration

ToDurationPointerOrNilIfZero 将time.Duration类型的变量转换为对应的*time.Duration指针类型,如果变量的值为0的话则返回nil指针

func ToFloat32Pointer

func ToFloat32Pointer(v float32) *float32

ToFloat32Pointer 将float32类型的变量转换为对应的*float32指针类型

func ToFloat32PointerOrNilIfZero

func ToFloat32PointerOrNilIfZero(v float32) *float32

ToFloat32PointerOrNilIfZero 将float32类型的变量转换为对应的*float32指针类型,如果变量的值为0的话则返回nil指针

func ToFloat64Pointer

func ToFloat64Pointer(v float64) *float64

ToFloat64Pointer 将float64类型的变量转换为对应的*float64指针类型

func ToFloat64PointerOrNilIfZero

func ToFloat64PointerOrNilIfZero(v float64) *float64

ToFloat64PointerOrNilIfZero 将float64类型的变量转换为对应的*float64指针类型,如果变量的值为0的话则返回nil指针

func ToInt16Pointer

func ToInt16Pointer(v int16) *int16

ToInt16Pointer 将int16类型的变量转换为对应的*int16指针类型

func ToInt16PointerOrNilIfZero

func ToInt16PointerOrNilIfZero(v int16) *int16

ToInt16PointerOrNilIfZero 将int16类型的变量转换为对应的*int16指针类型,如果变量的值为0的话则返回nil指针

func ToInt32Pointer

func ToInt32Pointer(v int32) *int32

ToInt32Pointer 将int32类型的变量转换为对应的*int32指针类型

func ToInt32PointerOrNilIfZero

func ToInt32PointerOrNilIfZero(v int32) *int32

ToInt32PointerOrNilIfZero 将int32类型的变量转换为对应的*int32指针类型,如果变量的值为0的话则返回nil指针

func ToInt64Pointer

func ToInt64Pointer(v int64) *int64

ToInt64Pointer 将int64类型的变量转换为对应的*int64指针类型

func ToInt64PointerOrNilIfZero

func ToInt64PointerOrNilIfZero(v int64) *int64

ToInt64PointerOrNilIfZero 将int64类型的变量转换为对应的*int64指针类型,如果变量的值为0的话则返回nil指针

func ToInt8Pointer

func ToInt8Pointer(v int8) *int8

ToInt8Pointer 将int8类型的变量转换为对应的*int8指针类型

func ToInt8PointerOrNilIfZero

func ToInt8PointerOrNilIfZero(v int8) *int8

ToInt8PointerOrNilIfZero 将int8类型的变量转换为对应的*int8指针类型,如果变量的值为0的话则返回nil指针

func ToIntPointer

func ToIntPointer(v int) *int

ToIntPointer 将int类型的变量转换为对应的*int指针类型

func ToIntPointerOrNilIfZero

func ToIntPointerOrNilIfZero(v int) *int

ToIntPointerOrNilIfZero 将int类型的变量转换为对应的*int指针类型,如果变量的值为0的话则返回nil指针

func ToRunePointer

func ToRunePointer(v rune) *rune

ToRunePointer 将rune类型的变量转换为对应的*rune指针类型

func ToRunePointerOrNilIfZero

func ToRunePointerOrNilIfZero(v rune) *rune

ToRunePointerOrNilIfZero 将rune类型的变量转换为对应的*rune指针类型,如果变量的值为0的话则返回nil指针

func ToStringPointer

func ToStringPointer(v string) *string

ToStringPointer 将string类型的变量转换为对应的*string指针类型

func ToStringPointerOrNilIfEmpty

func ToStringPointerOrNilIfEmpty(v string) *string

ToStringPointerOrNilIfEmpty 将string类型的变量转换为对应的*string指针类型,如果变量的值为空字符串的话则返回nil指针

func ToTimePointer

func ToTimePointer(t time.Time) *time.Time

ToTimePointer 将time.Time类型转换为指针,如果时间为零值则返回空指针

func ToUint16Pointer

func ToUint16Pointer(v uint16) *uint16

ToUint16Pointer 将uint16类型的变量转换为对应的*uint16指针类型

func ToUint16PointerOrNilIfZero

func ToUint16PointerOrNilIfZero(v uint16) *uint16

ToUint16PointerOrNilIfZero 将uint16类型的变量转换为对应的*uint16指针类型,如果变量的值为0的话则返回nil指针

func ToUint32Pointer

func ToUint32Pointer(v uint32) *uint32

ToUint32Pointer 将uint32类型的变量转换为对应的*uint32指针类型

func ToUint32PointerOrNilIfZero

func ToUint32PointerOrNilIfZero(v uint32) *uint32

ToUint32PointerOrNilIfZero 将uint32类型的变量转换为对应的*uint32指针类型,如果变量的值为0的话则返回nil指针

func ToUint64Pointer

func ToUint64Pointer(v uint64) *uint64

ToUint64Pointer 将uint64类型的变量转换为对应的*uint64指针类型

func ToUint64PointerOrNilIfZero

func ToUint64PointerOrNilIfZero(v uint64) *uint64

ToUint64PointerOrNilIfZero 将uint64类型的变量转换为对应的*uint64指针类型,如果变量的值为0的话则返回nil指针

func ToUint8Pointer

func ToUint8Pointer(v uint8) *uint8

ToUint8Pointer 将uint8类型的变量转换为对应的*uint8指针类型

func ToUint8PointerOrNilIfZero

func ToUint8PointerOrNilIfZero(v uint8) *uint8

ToUint8PointerOrNilIfZero 将uint8类型的变量转换为对应的*uint8指针类型,如果变量的值为0的话则返回nil指针

func ToUintPointer

func ToUintPointer(v uint) *uint

ToUintPointer 将uint类型的变量转换为对应的*uint指针类型

func ToUintPointerOrNilIfZero

func ToUintPointerOrNilIfZero(v uint) *uint

ToUintPointerOrNilIfZero 将uint类型的变量转换为对应的*uint指针类型,如果变量的值为0的话则返回nil指针

func ToUintptrPointer

func ToUintptrPointer(v uintptr) *uintptr

ToUintptrPointer 将uintptr类型的变量转换为对应的*uintptr指针类型

func ToUintptrPointerOrNilIfZero

func ToUintptrPointerOrNilIfZero(v uintptr) *uintptr

ToUintptrPointerOrNilIfZero 将uintptr类型的变量转换为对应的*uintptr指针类型,如果变量的值为0的话则返回nil指针

Types

This section is empty.

Jump to

Keyboard shortcuts

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