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 ToDuration ¶ added in v0.12.0
ToDuration returns its argument as a time.Duration. It panics if its argument is nil or not a time.Duration.
func ToFloat64 ¶
ToFloat64 returns its argument as a float64. It panics if its argument is nil or not a float64.
Types ¶
Click to show internal directories.
Click to hide internal directories.