opt

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: BSD-3-Clause Imports: 2 Imported by: 23

Documentation

Overview

Package opt defines optional types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool string

Bool represents an optional boolean to be JSON-encoded. The string can be empty (for unknown or unspecified), or "true" or "false".

func (*Bool) Clear

func (b *Bool) Clear()

func (Bool) EqualBool added in v0.100.0

func (b Bool) EqualBool(v bool) bool

EqualBool reports whether b is equal to v. If b is empty or not a valid bool, it reports false.

func (Bool) Get

func (b Bool) Get() (v bool, ok bool)

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (*Bool) Set

func (b *Bool) Set(v bool)

func (*Bool) UnmarshalJSON

func (b *Bool) UnmarshalJSON(j []byte) error

Jump to

Keyboard shortcuts

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