Documentation ¶
Overview ¶
Package ptr provides functions to convert a literal value to pointer.
To be honest, this library is very trivial. If there are any other ways to get a pointer of the literal value, please tell us.
Index ¶
- func PBool(s bool) *bool
- func PByte(s byte) *byte
- func PComplex128(s complex128) *complex128
- func PComplex64(s complex64) *complex64
- func PFloat32(s float32) *float32
- func PFloat64(s float64) *float64
- func PInt(s int) *int
- func PInt16(s int16) *int16
- func PInt32(s int32) *int32
- func PInt64(s int64) *int64
- func PInt8(s int8) *int8
- func PRune(s rune) *rune
- func PStr(s string) *string
- func PUint(s uint) *uint
- func PUint16(s uint16) *uint16
- func PUint32(s uint32) *uint32
- func PUint64(s uint64) *uint64
- func PUint8(s uint8) *uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PComplex128 ¶ added in v1.0.0
func PComplex128(s complex128) *complex128
PComplex128 returns a pocomplexer of a given complex128.
func PComplex64 ¶ added in v1.0.0
PComplex64 returns a pocomplexer of a given complex64.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.