pointer

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(value float64) *float64

Float64 returns a pointer to the provided float64 value

func Float64Copy

func Float64Copy(value *float64) *float64

Float64Copy returns a pointer that's a copy of the provided value

func Float64IfValid

func Float64IfValid(valid bool, value float64) *float64

Float64IfValid returns a pointer to the value if it's valid, otherwise nil

func Float64OrDefault

func Float64OrDefault(value *float64, defaultValue float64) *float64

Float64OrDefault returns the pointer if not nil, otherwise the default value

func String

func String(value string) *string

String returns a pointer to the provided string value

func StringCopy

func StringCopy(value *string) *string

StringCopy returns a pointer that's a copy of the provided value

func StringIfValid

func StringIfValid(valid bool, value string) *string

StringIfValid returns a pointer to the value if it's valid, otherwise nil

func StringOrDefault

func StringOrDefault(value *string, defaultValue string) *string

StringOrDefault returns the pointer if not nil, otherwise the default value

func Time

func Time(value time.Time) *time.Time

Time returns a pointer to the provided time.Time value

func TimeCopy

func TimeCopy(value *time.Time) *time.Time

TimeCopy returns a pointer that's a copy of the provided value

func TimeIfValid

func TimeIfValid(valid bool, value time.Time) *time.Time

TimeIfValid returns a pointer to the value if it's valid, otherwise nil

func TimeOrDefault

func TimeOrDefault(value *time.Time, defaultValue time.Time) *time.Time

TimeOrDefault returns the pointer if not nil, otherwise the default value

func Uint64

func Uint64(value uint64) *uint64

Uint64 returns a pointer to the provided uint64 value

func Uint64Copy

func Uint64Copy(value *uint64) *uint64

Uint64Copy returns a pointer that's a copy of the provided value

func Uint64IfValid

func Uint64IfValid(valid bool, value uint64) *uint64

Uint64IfValid returns a pointer to the value if it's valid, otherwise nil

func Uint64OrDefault

func Uint64OrDefault(value *uint64, defaultValue uint64) *uint64

Uint64OrDefault returns the pointer if not nil, otherwise the default value

Types

This section is empty.

Jump to

Keyboard shortcuts

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