generator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aliases

func Aliases(data []byte, aliasesTmplPath, aliasesTmplName, commit string) ([]byte, error)

Aliases reads from buf and builds aliases_map.go file from aliasesTmplPath.

func Documentation

func Documentation(data []byte, documentationTmplPath, documentationTmplName, commit string) ([]byte, error)

Documentation reads from buf and builds documentation_matchers.go file from documentationTmplPath.

func Extensions

func Extensions(data []byte, extensionsTmplPath, extensionsTmplName, commit string) ([]byte, error)

Extensions reads from buf and builds extensions_map.go file from extensionsTmplPath.

func Filenames

func Filenames(data []byte, filenamesTmplPath, filenamesTmplName, commit string) ([]byte, error)

Filenames reads from buf and builds filenames_map.go file from filenamesTmplPath.

func FromFile

func FromFile(fileToParse, outPath, tmplPath, tmplName, commit string, generate Func) error

FromFile read data to parse from a file named fileToParse and write the generated source code to a file named outPath. The generated source code is formated with gofmt and tagged with commit.

func Heuristics

func Heuristics(heuristics []byte, contentTmplPath, contentTmplName, commit string) ([]byte, error)

Heuristics reads from buf and builds content.go file from contentTmplPath.

func Interpreters

func Interpreters(data []byte, interpretersTmplPath, interpretersTmplName, commit string) ([]byte, error)

Interpreters reads from buf and builds interpreters_map.go file from interpretersTmplPath.

func Types

func Types(data []byte, typeTmplPath, typeTmplName, commit string) ([]byte, error)

Types reads from buf and builds type.go file from typeTmplPath.

func Vendor

func Vendor(data []byte, vendorTmplPath, vendorTmplName, commit string) ([]byte, error)

Vendor reads from buf and builds vendor_matchers.go file from vendorTmplPath.

Types

type Func

type Func func(dataToParse []byte, templatePath string, template string, commit string) ([]byte, error)

Func is the function's type that generate the files from templates.

Jump to

Keyboard shortcuts

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