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 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.