cmd

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Zlib Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = ""

	// VersionCmd is "version" subcommand.
	// It prints the version, revision and built time information to stdout.
	VersionCmd = &cli.Command{
		Name:  "version",
		Usage: "Print some information about version",
		Description: `Prints version information that might help you get out of trouble.
And it display revision and built time information.`,
		Action: showVersion,
	}
)

Version information for cmd Use "var" (not const) to defined variable for `go build -ldflags` And export 'Version' variable ⚠️ WARNING: should only be set by "-ldflags" cli flag.

View Source
var (
	// Web is "web" subcommand. It's used to run web server
	Web = &cli.Command{
		Name:  "web",
		Usage: "Start web server interface for blog",
		Description: `Run a performant web server which serves the site
for blog. If '--port' flag is not used, it will use
port 8080 by default.`,
		Action: runWeb,
		Flags: []cli.Flag{
			port,
			webroot,
		},
	}
)

Functions

func Execute

func Execute() error

Execute to run cmd

Types

This section is empty.

Jump to

Keyboard shortcuts

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