enum

package
v0.0.0-...-7551c24 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSONArray

func MarshalJSONArray[E interface{ Split() []T }, T interface{ String() string }](v E) ([]byte, error)

func Parse

func Parse[T number](ename string, s string, names []string) (T, error)

func ParseMulti

func ParseMulti[T number](ename string, s string, lists [][]string) (T, error)

func ParseSet

func ParseSet[T number](ename string, s string, names []string) (T, error)

func ParseSetMulti

func ParseSetMulti[T number](ename string, s string, lists [][]string) (T, error)

func SplitBits

func SplitBits[T number](v T) (out []T)

func StringBits

func StringBits[T number](v T, names []string) string

func StringBitsRaw

func StringBitsRaw[T number](v T) string

Types

type Enum

type Enum[T number] interface {
	json.Marshaler
	Has(c2 T) bool
	HasAny(c2 T) bool
	Split() []T
	String() string
}

Jump to

Keyboard shortcuts

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