generator

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package generator provides the core functionality of enum2go generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *Config) error

Run generates enum definitions using config data and specs in user code.

Types

type Config

type Config struct {
	Dir        string
	TargetFile string
	FileIO     FIO
}

Config describes some

type FIO added in v0.2.0

type FIO interface {
	ParsePkg(fset *token.FileSet, dir string) (pkgName string, _ []*ast.File, _ error)
	WriteFile(name string, data io.Reader) error
}

FIO describes a generic file input/output system.

Directories

Path Synopsis
Package cast provides AST templating utilities.
Package cast provides AST templating utilities.
Package cast contains template types and functions.
Package cast contains template types and functions.

Jump to

Keyboard shortcuts

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