enum

package
v0.0.0-...-35c18bc Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 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 EnumGen

type EnumGen struct {
	gengo.SnippetWriter
	// contains filtered or unexported fields
}

func (*EnumGen) GenerateType

func (g *EnumGen) GenerateType(c *gengo.Context, named *types.Named) error

func (*EnumGen) Init

func (EnumGen) Name

func (EnumGen) Name() string

func (EnumGen) New

func (EnumGen) New() gengo.Generator

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) interface{}

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)

Jump to

Keyboard shortcuts

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