generators

package
v0.14.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 10 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. Deprecated: use github.com/gobuffalo/genny/movinglater/gotools.AddImport instead.

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.Walkable) (Files, error)

FindByBox all the .tmpl files inside the packd.Box

Directories

Path Synopsis
You can use the "packr clean" command to clean up this, and any other packr generated files.
You can use the "packr clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

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