enumgen

package module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

enumgen

enumgen allows you to generate string enums with 100% test cov and json parsing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFile

func GenerateFile(filename, templateFile string, data *TemplateData) error

func GenerateFiles

func GenerateFiles(path string, data *TemplateData) ([]string, error)

Types

type FilenameError

type FilenameError struct {
	EnumTypeName string
}

func (*FilenameError) Error

func (e *FilenameError) Error() string

type PathError

type PathError struct {
	Path string
}

func (*PathError) Error

func (e *PathError) Error() string

type TemplateData

type TemplateData struct {
	PackageName         string
	EnumTypeName        string
	EnumTypeShortName   string
	WithConstTypePrefix bool
	EnumValues          []string
}

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

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