tribool

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

package tribool implements a simple nullable tri-way value

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tribool

type Tribool struct {
	Value int
	Valid bool
}

func NewTribool

func NewTribool(ints ...int) Tribool

func (Tribool) Bool

func (t Tribool) Bool() bool

func (Tribool) MarshalJSON

func (t Tribool) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler. It will encode null if this Int is null.

func (Tribool) String

func (t Tribool) String() string

func (*Tribool) UnmarshalJSON

func (t *Tribool) UnmarshalJSON(bs []byte) error

UnmarshalJSON implements json.Unmarshaller.

Jump to

Keyboard shortcuts

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