command

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdBuildUse   = "build"
	CmdBuildShort = "build project binary"
)
View Source
const (
	CmdProjectUse   = "project"
	CmdProjectShort = "project management"
)
View Source
const (
	CmdProjectCreateUse   = "create NAME"
	CmdProjectCreateShort = "create a new project"
)
View Source
const (
	CmdProjectGenerateUse   = "generate"
	CmdProjectGenerateShort = "generate files for all services in the project"
)
View Source
const (
	CmdRunUse   = "run"
	CmdRunShort = "run project with live reload"
)
View Source
const (
	CmdServiceUse   = "service"
	CmdServiceShort = "service management"
)
View Source
const (
	CmdServiceCreateUse   = "create NAME"
	CmdServiceCreateShort = "create a new service"
)
View Source
const (
	CmdServiceGenerateUse   = "generate NAME [OPTION]"
	CmdServiceGenerateShort = "generate files for service"
)
View Source
const (
	CmdVersionUse   = "version"
	CmdVersionShort = "output version"
)

Variables

View Source
var (
	ErrCreateDir      = errors.New("cannot create dir")
	ErrDirExist       = errors.New("dir already exists")
	ErrFileExist      = errors.New("file already exists")
	ErrParseTemplate  = errors.New("cannot parse template")
	ErrMetaValueType  = errors.New("type of the value is not correct")
	ErrDirNotProject  = errors.New("dir is not a project")
	ErrAirMissing     = errors.New("air binary not found")
	ErrReadInternal   = errors.New("read internal directory")
	ErrStatDefinition = errors.New("stat service definition")
	ErrAtomikaExited  = errors.New("atomika process exited")
	ErrStartGoRun     = errors.New("start go run")
	ErrSetupWatcher   = errors.New("setup watcher")
	ErrWatchPath      = errors.New("watch path")
	ErrMainMissing    = errors.New("main package not found under cmd")
	ErrCmdMissing     = errors.New("cmd directory not found")
	ErrCmdNotDir      = errors.New("cmd is not a directory")
	ErrPortInUse      = errors.New("port already in use")
	ErrGoBuild        = errors.New("go build failed")
)
View Source
var CmdProjectAlias = []string{"p", "proj"}
View Source
var CmdProjectCreateAlias = []string{"c"}
View Source
var CmdProjectGenerateAlias = []string{"gen"}
View Source
var CmdServiceAlias []string
View Source
var CmdServiceCreateAlias = []string{"c"}
View Source
var CmdServiceGenerateAlias = []string{"gen"}
View Source
var CmdVersionAlias = []string{"v", "ver"}

Functions

This section is empty.

Types

type Command

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

func New

func New(version string) *Command

func (*Command) Execute

func (c *Command) Execute(args []string) error

type Execute

type Execute func(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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