intbool

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntOrBool

type IntOrBool struct {
	Type    Type
	IntVal  int32
	BoolVal bool
}

func FromBool

func FromBool(val bool) *IntOrBool

func FromInt

func FromInt(val int) *IntOrBool

func (IntOrBool) MarshalJSON

func (ib IntOrBool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*IntOrBool) UnmarshalJSON

func (ib *IntOrBool) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

type Type

type Type int

Type represents the stored type of IntOrBool.

const (
	Int  Type = iota // The IntOrBool holds an int.
	Bool             // The IntOrBool holds a bool.
)

Jump to

Keyboard shortcuts

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