go: cloud.google.com/go/internal/optional Index | Files

package optional

import "cloud.google.com/go/internal/optional"

Package optional provides versions of primitive types that can be nil. These are useful in methods that update some of an API object's fields.

Index

Package Files

optional.go

func ToBool Uses

func ToBool(v Bool) bool

ToBool returns its argument as a bool. It panics if its argument is nil or not a bool.

func ToFloat64 Uses

func ToFloat64(v Float64) float64

ToFloat64 returns its argument as a float64. It panics if its argument is nil or not a float64.

func ToInt Uses

func ToInt(v Int) int

ToInt returns its argument as an int. It panics if its argument is nil or not an int.

func ToString Uses

func ToString(v String) string

ToString returns its argument as a string. It panics if its argument is nil or not a string.

func ToUint Uses

func ToUint(v Uint) uint

ToUint returns its argument as a uint. It panics if its argument is nil or not a uint.

type Bool Uses

type Bool interface{}

Bool is either a bool or nil.

type Float64 Uses

type Float64 interface{}

Float64 is either a float64 or nil.

type Int Uses

type Int interface{}

Int is either an int or nil.

type String Uses

type String interface{}

String is either a string or nil.

type Uint Uses

type Uint interface{}

Uint is either a uint or nil.

Package optional imports 2 packages (graph) and is imported by 2 packages. Updated 2017-07-21. Refresh now. Tools for package owners.