cmd

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const Zfile = ".zzz.yaml"
View Source
const ZfileWindow = ".zzz.windows.yaml"

Variables

View Source
var New = cli.Command{
	Name:        "new",
	Usage:       "create zzz file",
	Description: `create zzz configuration file`,
	Action:      CmdNew,
	Flags:       []cli.Flag{},
}
View Source
var Optimize = cli.Command{
	Name:        "optimize",
	Usage:       "Performance optimization tools",
	Description: `Manage and monitor performance optimizations`,
	Action:      CmdOptimize,
	Flags: []cli.Flag{
		cli.BoolFlag{
			Name:  "status, s",
			Usage: "Show optimization status",
		},
		cli.BoolFlag{
			Name:  "detailed, d",
			Usage: "Show detailed performance statistics",
		},
		cli.BoolFlag{
			Name:  "json, j",
			Usage: "Output in JSON format",
		},
		cli.StringFlag{
			Name:  "tune",
			Usage: "Tune for environment: development, production",
		},
		cli.IntFlag{
			Name:  "gc-percent",
			Usage: "Set garbage collection target percentage",
		},
		cli.BoolFlag{
			Name:  "force-gc",
			Usage: "Force garbage collection",
		},
		cli.BoolFlag{
			Name:  "clear-cache",
			Usage: "Clear all caches",
		},
		cli.BoolFlag{
			Name:  "reload-config",
			Usage: "Force reload configuration",
		},
	},
}
View Source
var Run = cli.Command{
	Name:        "run",
	Usage:       "Run the application",
	Description: `Run the application by starting a local development server`,
	Action:      CmdRun,
	Flags: []cli.Flag{
		stringFlag("ldflags, ld", "", "Set the build ldflags. See: https://golang.org/pkg/go/build/"),
	},
}
View Source
var Status = cli.Command{
	Name:        "status",
	Usage:       "Show system status",
	Description: `Display current system status and statistics`,
	Action:      CmdStatus,
}
View Source
var Version = cli.Command{
	Name:        "version",
	Usage:       "show env info",
	Description: `show env info`,
	Action:      CmdVersion,
	Flags:       []cli.Flag{},
}

Functions

func CmdAutoBuild

func CmdAutoBuild(rootPath string)

func CmdAutoBuildRust added in v0.0.7

func CmdAutoBuildRust(rootPath string)

func CmdDone

func CmdDone(rootPath string)

func CmdNew

func CmdNew(c *cli.Context) error

func CmdOptimize added in v0.0.7

func CmdOptimize(c *cli.Context) error

func CmdRestart

func CmdRestart(rootPath string)

func CmdRun

func CmdRun(c *cli.Context) error

func CmdRunAfter

func CmdRunAfter(rootPath string)

func CmdRunBefore

func CmdRunBefore(rootPath string)

func CmdRunExit added in v0.0.3

func CmdRunExit(rootPath string)

func CmdStart

func CmdStart(rootPath string)

func CmdStartRust added in v0.0.7

func CmdStartRust(rootPath string)

func CmdStatus added in v0.0.7

func CmdStatus(c *cli.Context) error

func CmdVersion

func CmdVersion(c *cli.Context) error

func GetBashFileSuffix added in v0.0.4

func GetBashFileSuffix() string

func GetGoVersion

func GetGoVersion() string

func InitBanner

func InitBanner(out io.Writer, in io.Reader)

InitBanner loads the banner and prints it to output All errors are ignored, the application will not print the banner in case of error.

func Kill

func Kill()

Kill kills the running command process with improved error handling

func Now

func Now(layout string) string

Now returns the current local time in the specified layout

func ShowShortVersionBanner

func ShowShortVersionBanner()

ShowShortVersionBanner prints the short version banner.

Types

type RuntimeInfo

type RuntimeInfo struct {
	GoVersion  string
	GOOS       string
	GOARCH     string
	NumCPU     int
	GOPATH     string
	GOROOT     string
	Compiler   string
	ZZZVersion string
}

RuntimeInfo holds information about the current runtime.

type ZZZ

type ZZZ struct {
	Dev       bool
	Title     string
	Frequency int64
	DirFilter []string
	Ext       []string
	Lang      string
	EnableRun bool
	Action    struct {
		Before []string `yaml:"before"`
		After  []string `yaml:"after"`
		Exit   []string `yaml:"exit"`
	}
	Link string
}

Note: struct fields must be public in order for unmarshal to correctly populate the data.

Jump to

Keyboard shortcuts

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