enumizer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, path string, output string) error

func GenerateEnumHelpers

func GenerateEnumHelpers(packageName string, enums Enums) ([]byte, error)

Types

type Enum

type Enum struct {
	Name     string
	Variants []string
}

type EnumPackage

type EnumPackage struct {
	Path  string
	Enums Enums
}

type EnumPackages

type EnumPackages map[string]EnumPackage

func FindEnumPackages

func FindEnumPackages(path string) (EnumPackages, error)

type Enums

type Enums map[string]Enum

func (*Enums) Put

func (e *Enums) Put(name string, variants ...string)

func (Enums) SortedEnums

func (e Enums) SortedEnums() []Enum

Jump to

Keyboard shortcuts

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