ptr

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ptr provides some helpers for converting types to pointers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(val interface{}, def ...bool) *bool

Bool returns a bool pointer

func Duration

func Duration(val interface{}) *time.Duration

Duration is a safe time.Duration pointer wrapper

func Float64

func Float64(val interface{}) *float64

Float64 is a safe float64 pointer wrapper

func Int64

func Int64(val interface{}) *int64

Int64 is a safe int64 pointer wrapper

func String

func String(val interface{}) *string

String is a safe string pointer wrapper

Types

This section is empty.

Jump to

Keyboard shortcuts

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