boilerplate

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Cmd for command usage
	Cmd = cli.Command{
		Name:      "boilerplate",
		ShortName: "bp",
		Subcommands: cli.Commands{
			CmdRoutes,
		},
	}

	// CmdRoutes create routes
	CmdRoutes = cli.Command{
		Name:   "routes",
		Action: routesCmd,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name: "projectName",
			},
			cli.StringFlag{
				Name: "prefix",
			},
			cli.StringFlag{
				Name:  "routes",
				Value: "routes",
			},
		},
	}
)

Functions

func Prefix

func Prefix(prefix string) func(rw *RoutesWriter)

func ProjectName

func ProjectName(projectName string) func(rw *RoutesWriter)

Types

type Func

type Func struct {
	Name string
}

func NewFunc

func NewFunc(name string) Func

func (Func) Lower

func (f Func) Lower() string

type RoutesWriter

type RoutesWriter struct {
	// contains filtered or unexported fields
}

func NewRoutesWriter

func NewRoutesWriter(opts ...func(*RoutesWriter)) *RoutesWriter

func (*RoutesWriter) WriteRegistreRoutes

func (rw *RoutesWriter) WriteRegistreRoutes(targetPath string, rts routes.Routes) (err error)

WriteRegistreRoutes write routes register file

func (*RoutesWriter) WriteRoute

func (rw *RoutesWriter) WriteRoute(routesDir string, route routes.Route) (err error)

func (*RoutesWriter) WriteRoutes

func (rw *RoutesWriter) WriteRoutes(routesDir string, routes []routes.Route) (err error)

Directories

Path Synopsis
lol

Jump to

Keyboard shortcuts

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