pointer: gomodules.xyz/pointer Index | Files

package pointer

import "gomodules.xyz/pointer"

Index

Package Files

convert_types.go

func Bool Uses

func Bool(v *bool) bool

Bool returns the value of the bool pointer passed in or false if the pointer is nil.

func BoolMap Uses

func BoolMap(src map[string]*bool) map[string]bool

BoolMap converts a string map of bool pointers into a string map of bool values

func BoolP Uses

func BoolP(v bool) *bool

BoolP returns a pointer to the bool value passed in.

func BoolPMap Uses

func BoolPMap(src map[string]bool) map[string]*bool

BoolPMap converts a string map of bool values into a string map of bool pointers

func BoolPSlice Uses

func BoolPSlice(src []bool) []*bool

BoolPSlice converts a slice of bool values into a slice of bool pointers

func BoolSlice Uses

func BoolSlice(src []*bool) []bool

BoolSlice converts a slice of bool pointers into a slice of bool values

func FalseP Uses

func FalseP() *bool

FalseP returns a pointer to `false` boolean value.

func Float32 Uses

func Float32(v *float32) float32

Float32 returns the value of the float32 pointer passed in or 0 if the pointer is nil.

func Float32Map Uses

func Float32Map(src map[string]*float32) map[string]float32

Float32Map converts a string map of float32 pointers into a string map of float32 values

func Float32P Uses

func Float32P(v float32) *float32

Float32P returns a pointer to the float32 value passed in.

func Float32PMap Uses

func Float32PMap(src map[string]float32) map[string]*float32

Float32PMap converts a string map of float32 values into a string map of float32 pointers

func Float32PSlice Uses

func Float32PSlice(src []float32) []*float32

Float32PSlice converts a slice of float32 values into a slice of float32 pointers

func Float32Slice Uses

func Float32Slice(src []*float32) []float32

Float32Slice converts a slice of float32 pointers into a slice of float32 values

func Float64 Uses

func Float64(v *float64) float64

Float64 returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func Float64Map Uses

func Float64Map(src map[string]*float64) map[string]float64

Float64Map converts a string map of float64 pointers into a string map of float64 values

func Float64P Uses

func Float64P(v float64) *float64

Float64P returns a pointer to the float64 value passed in.

func Float64PMap Uses

func Float64PMap(src map[string]float64) map[string]*float64

Float64PMap converts a string map of float64 values into a string map of float64 pointers

func Float64PSlice Uses

func Float64PSlice(src []float64) []*float64

Float64PSlice converts a slice of float64 values into a slice of float64 pointers

func Float64Slice Uses

func Float64Slice(src []*float64) []float64

Float64Slice converts a slice of float64 pointers into a slice of float64 values

func Int Uses

func Int(v *int) int

Int returns the value of the int pointer passed in or 0 if the pointer is nil.

func Int16 Uses

func Int16(v *int16) int16

Int16 returns the value of the int16 pointer passed in or 0 if the pointer is nil.

func Int16Map Uses

func Int16Map(src map[string]*int16) map[string]int16

Int16Map converts a string map of int16 pointers into a string map of int16 values

func Int16P Uses

func Int16P(v int16) *int16

Int16P returns a pointer to the int16 value passed in.

func Int16PMap Uses

func Int16PMap(src map[string]int16) map[string]*int16

Int16PMap converts a string map of int16 values into a string map of int16 pointers

func Int16PSlice Uses

func Int16PSlice(src []int16) []*int16

Int16PSlice converts a slice of int16 values into a slice of int16 pointers

func Int16Slice Uses

func Int16Slice(src []*int16) []int16

Int16Slice converts a slice of int16 pointers into a slice of int16 values

func Int32 Uses

func Int32(v *int32) int32

Int32 returns the value of the int32 pointer passed in or 0 if the pointer is nil.

func Int32Map Uses

func Int32Map(src map[string]*int32) map[string]int32

Int32Map converts a string map of int32 pointers into a string map of int32 values

func Int32P Uses

func Int32P(v int32) *int32

Int32P returns a pointer to the int32 value passed in.

func Int32PMap Uses

func Int32PMap(src map[string]int32) map[string]*int32

Int32PMap converts a string map of int32 values into a string map of int32 pointers

func Int32PSlice Uses

func Int32PSlice(src []int32) []*int32

Int32PSlice converts a slice of int32 values into a slice of int32 pointers

func Int32Slice Uses

func Int32Slice(src []*int32) []int32

Int32Slice converts a slice of int32 pointers into a slice of int32 values

func Int64 Uses

func Int64(v *int64) int64

Int64 returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func Int64Map Uses

func Int64Map(src map[string]*int64) map[string]int64

Int64Map converts a string map of int64 pointers into a string map of int64 values

func Int64P Uses

func Int64P(v int64) *int64

Int64P returns a pointer to the int64 value passed in.

func Int64PMap Uses

func Int64PMap(src map[string]int64) map[string]*int64

Int64PMap converts a string map of int64 values into a string map of int64 pointers

func Int64PSlice Uses

func Int64PSlice(src []int64) []*int64

Int64PSlice converts a slice of int64 values into a slice of int64 pointers

func Int64Slice Uses

func Int64Slice(src []*int64) []int64

Int64Slice converts a slice of int64 pointers into a slice of int64 values

func Int8 Uses

func Int8(v *int8) int8

Int8 returns the value of the int8 pointer passed in or 0 if the pointer is nil.

func Int8Map Uses

func Int8Map(src map[string]*int8) map[string]int8

Int8Map converts a string map of int8 pointers into a string map of int8 values

func Int8P Uses

func Int8P(v int8) *int8

Int8P returns a pointer to the int8 value passed in.

func Int8PMap Uses

func Int8PMap(src map[string]int8) map[string]*int8

Int8PMap converts a string map of int8 values into a string map of int8 pointers

func Int8PSlice Uses

func Int8PSlice(src []int8) []*int8

Int8PSlice converts a slice of int8 values into a slice of int8 pointers

func Int8Slice Uses

func Int8Slice(src []*int8) []int8

Int8Slice converts a slice of int8 pointers into a slice of int8 values

func IntMap Uses

func IntMap(src map[string]*int) map[string]int

IntMap converts a string map of int pointers into a string map of int values

func IntP Uses

func IntP(v int) *int

IntP returns a pointer to the int value passed in.

func IntPMap Uses

func IntPMap(src map[string]int) map[string]*int

IntPMap converts a string map of int values into a string map of int pointers

func IntPSlice Uses

func IntPSlice(src []int) []*int

IntPSlice converts a slice of int values into a slice of int pointers

func IntSlice Uses

func IntSlice(src []*int) []int

IntSlice converts a slice of int pointers into a slice of int values

func MillisecondsTime Uses

func MillisecondsTime(v *int64) time.Time

MillisecondsTime converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.

func SecondsTime Uses

func SecondsTime(v *int64) time.Time

SecondsTime converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.

func String Uses

func String(v *string) string

String returns the value of the string pointer passed in or "" if the pointer is nil.

func StringMap Uses

func StringMap(src map[string]*string) map[string]string

StringMap converts a string map of string pointers into a string map of string values

func StringP Uses

func StringP(v string) *string

StringP returns a pointer to the string value passed in.

func StringPMap Uses

func StringPMap(src map[string]string) map[string]*string

StringPMap converts a string map of string values into a string map of string pointers

func StringPSlice Uses

func StringPSlice(src []string) []*string

StringPSlice converts a slice of string values into a slice of string pointers

func StringSlice Uses

func StringSlice(src []*string) []string

StringSlice converts a slice of string pointers into a slice of string values

func Time Uses

func Time(v *time.Time) time.Time

Time returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.

func TimeMap Uses

func TimeMap(src map[string]*time.Time) map[string]time.Time

TimeMap converts a string map of time.Time pointers into a string map of time.Time values

func TimeP Uses

func TimeP(v time.Time) *time.Time

TimeP returns a pointer to the time.Time value passed in.

func TimePMap Uses

func TimePMap(src map[string]time.Time) map[string]*time.Time

TimePMap converts a string map of time.Time values into a string map of time.Time pointers

func TimePSlice Uses

func TimePSlice(src []time.Time) []*time.Time

TimePSlice converts a slice of time.Time values into a slice of time.Time pointers

func TimeSlice Uses

func TimeSlice(src []*time.Time) []time.Time

TimeSlice converts a slice of time.Time pointers into a slice of time.Time values

func TimeUnixMilli Uses

func TimeUnixMilli(t time.Time) int64

TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero TimeP is undefined.

This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.

See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.

func TrueP Uses

func TrueP() *bool

FalseP returns a pointer to `true` boolean value.

func Uint Uses

func Uint(v *uint) uint

Uint returns the value of the uint pointer passed in or 0 if the pointer is nil.

func Uint16 Uses

func Uint16(v *uint16) uint16

Uint16 returns the value of the uint16 pointer passed in or 0 if the pointer is nil.

func Uint16Map Uses

func Uint16Map(src map[string]*uint16) map[string]uint16

Uint16Map converts a string map of uint16 pointers into a string map of uint16 values

func Uint16P Uses

func Uint16P(v uint16) *uint16

Uint16P returns a pointer to the uint16 value passed in.

func Uint16PMap Uses

func Uint16PMap(src map[string]uint16) map[string]*uint16

Uint16PMap converts a string map of uint16 values into a string map of uint16 pointers

func Uint16PSlice Uses

func Uint16PSlice(src []uint16) []*uint16

Uint16PSlice converts a slice of uint16 values into a slice of uint16 pointers

func Uint16Slice Uses

func Uint16Slice(src []*uint16) []uint16

Uint16Slice converts a slice of uint16 pointers into a slice of uint16 values

func Uint32 Uses

func Uint32(v *uint32) uint32

Uint32 returns the value of the uint32 pointer passed in or 0 if the pointer is nil.

func Uint32Map Uses

func Uint32Map(src map[string]*uint32) map[string]uint32

Uint32Map converts a string map of uint32 pointers into a string map of uint32 values

func Uint32P Uses

func Uint32P(v uint32) *uint32

Uint32P returns a pointer to the uint32 value passed in.

func Uint32PMap Uses

func Uint32PMap(src map[string]uint32) map[string]*uint32

Uint32PMap converts a string map of uint32 values into a string map of uint32 pointers

func Uint32PSlice Uses

func Uint32PSlice(src []uint32) []*uint32

Uint32PSlice converts a slice of uint32 values into a slice of uint32 pointers

func Uint32Slice Uses

func Uint32Slice(src []*uint32) []uint32

Uint32Slice converts a slice of uint32 pointers into a slice of uint32 values

func Uint64 Uses

func Uint64(v *uint64) uint64

Uint64 returns the value of the uint64 pointer passed in or 0 if the pointer is nil.

func Uint64Map Uses

func Uint64Map(src map[string]*uint64) map[string]uint64

Uint64Map converts a string map of uint64 pointers into a string map of uint64 values

func Uint64P Uses

func Uint64P(v uint64) *uint64

Uint64P returns a pointer to the uint64 value passed in.

func Uint64PMap Uses

func Uint64PMap(src map[string]uint64) map[string]*uint64

Uint64PMap converts a string map of uint64 values into a string map of uint64 pointers

func Uint64PSlice Uses

func Uint64PSlice(src []uint64) []*uint64

Uint64PSlice converts a slice of uint64 values into a slice of uint64 pointers

func Uint64Slice Uses

func Uint64Slice(src []*uint64) []uint64

Uint64Slice converts a slice of uint64 pointers into a slice of uint64 values

func Uint8 Uses

func Uint8(v *uint8) uint8

Uint8 returns the value of the uint8 pointer passed in or 0 if the pointer is nil.

func Uint8Map Uses

func Uint8Map(src map[string]*uint8) map[string]uint8

Uint8Map converts a string map of uint8 pointers into a string map of uint8 values

func Uint8P Uses

func Uint8P(v uint8) *uint8

Uint8P returns a pointer to the uint8 value passed in.

func Uint8PMap Uses

func Uint8PMap(src map[string]uint8) map[string]*uint8

Uint8PMap converts a string map of uint8 values into a string map of uint8 pointers

func Uint8PSlice Uses

func Uint8PSlice(src []uint8) []*uint8

Uint8PSlice converts a slice of uint8 values into a slice of uint8 pointers

func Uint8Slice Uses

func Uint8Slice(src []*uint8) []uint8

Uint8Slice converts a slice of uint8 pointers into a slice of uint8 values

func UintMap Uses

func UintMap(src map[string]*uint) map[string]uint

UintMap converts a string map of uint pointers uinto a string map of uint values

func UintP Uses

func UintP(v uint) *uint

UintP returns a pointer to the uint value passed in.

func UintPMap Uses

func UintPMap(src map[string]uint) map[string]*uint

UintPMap converts a string map of uint values uinto a string map of uint pointers

func UintPSlice Uses

func UintPSlice(src []uint) []*uint

UintPSlice converts a slice of uint values uinto a slice of uint pointers

func UintSlice Uses

func UintSlice(src []*uint) []uint

UintSlice converts a slice of uint pointers uinto a slice of uint values

Package pointer imports 1 packages (graph) and is imported by 16 packages. Updated 2020-11-10. Refresh now. Tools for package owners.