Documentation
¶
Overview ¶
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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBool ¶
ToBool returns its argument as a bool. It panics if its argument is nil or not a bool.
func ToFloat64 ¶
ToFloat64 returns its argument as a float64. It panics if its argument is nil or not a float64.
func ToInt ¶
ToInt returns its argument as an int. It panics if its argument is nil or not an int.
func ToString ¶
ToString returns its argument as a string. It panics if its argument is nil or not a string.
Types ¶
Source Files
¶
- optional.go
Click to show internal directories.
Click to hide internal directories.