opt

package
Version: 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: 0

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL