generator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateEnumTypes

func GenerateEnumTypes(options Options, enums ...StringEnumDefinition)

GenerateEnumTypes scaffolds enum types for the given options anddefinitions

Types

type Options

type Options struct {
	// Filesystem path of the directory corresponding to the package to be used or created
	PackageDirectoryPath string
	// Import path of the package to be used or created. It must be a valid path according to the working module structure
	PackageImportPath string
	// Whether to omit the generated code header on files. Default value is false
	OmitGeneratedNotice bool
	// Whether to omit tests for generated code. Default value is false
	OmitTests bool
}

Options defined the options to be passed to the generator to configure certain aspects of the code generation

type StringEnumDefinition

type StringEnumDefinition struct {
	Name   string
	Values []string
}

StringEnumDefinition is the basic name:values definition of an enumeration. As the name implies, this is for string enumerations only

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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