command

package
v0.0.0-...-3786ba6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CFG = &cli.StringFlag{
	Name:  "config, c",
	Usage: "Load configuration from `FILE`",
}
View Source
var NewCmd = &cli.Command{
	Name:    "new",
	Aliases: []string{"n"},
	Usage:   "creates something new",
	Subcommands: []*cli.Command{
		NewProjectCmd,
	},
}
View Source
var NewProjectCmd = &cli.Command{
	Name:    "project",
	Aliases: []string{"p"},
	Usage:   "create a project",
	Flags: []cli.Flag{
		&cli.StringFlag{Name: "name, n", Usage: "name of the project"},
		&cli.StringFlag{Name: "template, t", Usage: "project template"},
	},
	Action: newProjectAction,
}
View Source
var (
	StartCmd = &cli.Command{
		Name:   "start",
		Action: startHandler,
		Before: altsrc.InitInputSourceWithContext(startFlags, altsrc.NewYamlSourceFromFlagFunc("config")),
		Flags:  startFlags,
	}
)

Functions

func Execute

func Execute() error

func LoadConfig

func LoadConfig(c *cli.Context) error

func PrintErr

func PrintErr(msg string, err error)

func Println

func Println(msg string, task interface{})

Types

type Config

type Config struct {
	Project *Project
}

func DefaultConfig

func DefaultConfig() *Config

type Project

type Project struct {
	ImportPath  string
	ProjectName string
	Template    *template.Template
}

func NewProject

func NewProject(projectName string) *Project

func (*Project) Build

func (p *Project) Build() error

func (*Project) Import

func (p *Project) Import(packageName string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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