generators

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 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

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 Find

func Find(path string) (Files, error)

Find all the .tmpl files inside the buffalo GOPATH

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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