model

package
v0.0.0-...-82bf845 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntUntypedOne = iota + 1
	IntUntypedTwo
)
View Source
const (
	StringUntypedOne = "ONE"
	StringUntypedTwo = "TWO"
)
View Source
const (
	BoolUntypedTrue  = true
	BoolUntypedFalse = false
)

Variables

View Source
var (
	VarUntypedTrue  = true
	VarUntypedFalse = false
)

Functions

This section is empty.

Types

type BoolTyped

type BoolTyped bool
const (
	BoolTypedTrue  BoolTyped = true
	BoolTypedFalse BoolTyped = false
)

type IntTyped

type IntTyped int

this file is provided as an example for int-based enums but if you instead wanted to support arbitrary english words for numbers to integers, consider github.com/will-lol/numberconverter/etoi or a similar library

const (
	IntTypedOne IntTyped = iota + 1
	IntTypedTwo
)

func (IntTyped) MarshalJSON

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

func (IntTyped) String

func (t IntTyped) String() string

func (*IntTyped) UnmarshalJSON

func (t *IntTyped) UnmarshalJSON(b []byte) (err error)

type StringTyped

type StringTyped string
const (
	StringTypedOne StringTyped = "ONE"
	StringTypedTwo StringTyped = "TWO"
)

type VarTyped

type VarTyped bool
var (
	VarTypedTrue  VarTyped = true
	VarTypedFalse VarTyped = false
)

Jump to

Keyboard shortcuts

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