ptr

package
v0.0.0-...-87426b5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ptr holds utilities for taking pointer references to values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool is a helper for turning bools into pointers for use in API types that want *bool.

func Duration

func Duration(t time.Duration) *time.Duration

Duration is a helper for turning time.Duration into pointers for use in API types that want *time.Duration.

func Int32

func Int32(i int32) *int32

Int32 is a helper for turning integers into pointers for use in API types that want *int32.

func Int64

func Int64(i int64) *int64

Int64 is a helper for turning integers into pointers for use in API types that want *int64.

func String

func String(s string) *string

String is a helper for turning strings into pointers for use in API types that want *string.

func Time

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

Time is a helper for turning a const time.Time into a pointer for use in API types that want *time.Duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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