generators

package
v0.13.14 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplatesPath = filepath.Join("github.com", "gobuffalo", "buffalo", "generators")

TemplatesPath is the "base" path for generator templates

Functions

func AddImport

func AddImport(path string, imports ...string) error

AddImport adds n number of import statements into the path provided

func AddInsideAppBlock

func AddInsideAppBlock(expressions ...string) error

AddInsideAppBlock will add anything inside of the app declaration block inside of `actions/app.go`

func AddRoute

func AddRoute(method, path, handlerName string) error

AddRoute adds a new route inside the `action/app.go` file.

Types

type File

type File struct {
	ReadPath  string
	WritePath string
	Body      string
}

File represents the file to be templated

type Files

type Files []File

Files is a slice of File

func FindByBox added in v0.11.0

func FindByBox(box packd.Box) (Files, error)

FindByBox all the .tmpl files inside the packd.Box

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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