enumgen

package
v0.0.0-...-f412a0c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumType

type EnumType struct {
	ConstUnknown *types.Const
	Constants    []*types.Const
	Comments     map[*types.Const][]string
}

func (*EnumType) Add

func (e *EnumType) Add(cv *types.Const, comments ...string)

func (*EnumType) IsIntStringer

func (e *EnumType) IsIntStringer() bool

func (*EnumType) Label

func (e *EnumType) Label(cv *types.Const) string

func (*EnumType) Value

func (e *EnumType) Value(cv *types.Const) any

type EnumTypes

type EnumTypes map[string]map[types.Type]*EnumType

func (EnumTypes) ResolveEnumType

func (e EnumTypes) ResolveEnumType(t types.Type) (*EnumType, bool)

func (EnumTypes) Walk

func (e EnumTypes) Walk(gc gengo.Context, inPkgPath string)

type Option

type Option struct {
	Name  string
	Label string
	Value any
}

Jump to

Keyboard shortcuts

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