ptr

package module
v0.0.0-...-700e5e4 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 1 Imported by: 0

README

Pointers to builtin types.

GoDoc Build Status (Linux) Build status (Windows) Coverage Status GoReportCard License

Package ptr is a very simple package that provides functions to return pointers to values of builtin types.

The deref subdirectory contains a package for safely dereferencing pointers.

These simple packages can be useful when dealing with APIs and datatypes that use pointers to represent optional parameters.

Almost all of the code in the ptr and ptr/deref packages has been automatically generated.

Documentation

Overview

Package ptr provides functions that return pointers to values.

These functions can prove useful for APIs and structures where pointers are used to indicate a nullable value.

Almost all of the code in this package is automatically generated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool returns a pointer to a bool.

func Byte

func Byte(n byte) *byte

Byte returns a pointer to a byte.

func Float32

func Float32(n float32) *float32

Float32 returns a pointer to a float32.

func Float64

func Float64(n float64) *float64

Float64 returns a pointer to a float64.

func Int

func Int(n int) *int

Int returns a pointer to an int.

func Int16

func Int16(n int16) *int16

Int16 returns a pointer to an int16.

func Int32

func Int32(n int32) *int32

Int32 returns a pointer to an int32.

func Int64

func Int64(n int64) *int64

Int64 returns a pointer to an int64.

func Int8

func Int8(n int8) *int8

Int8 returns a pointer to an int8.

func String

func String(s string) *string

String returns a pointer to a string.

func Time

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

Time returns a pointer to a time.Time.

func Uint

func Uint(n uint) *uint

Uint returns a pointer to a uint.

func Uint16

func Uint16(n uint16) *uint16

Uint16 returns a pointer to a uint16.

func Uint32

func Uint32(n uint32) *uint32

Uint32 returns a pointer to a uint32.

func Uint64

func Uint64(n uint64) *uint64

Uint64 returns a pointer to a uint64.

Types

This section is empty.

Directories

Path Synopsis
cmd
Package deref provides functions that safely dereferennce pointers.
Package deref provides functions that safely dereferennce pointers.

Jump to

Keyboard shortcuts

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