Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DataDirFlag --datadir DataDirFlag = &cli.StringFlag{ Name: "datadir", Usage: "Data directory (default in the execute directory)", Value: "", } // ConfigFileFlag -c|--config ConfigFileFlag = &cli.StringFlag{ Name: "config", Aliases: []string{"c"}, Usage: "Specify config file", } // LogFileFlag --log LogFileFlag = &cli.StringFlag{ Name: "log", Usage: "Specify log file, support rotate", } // LogRotationFlag --rotate LogRotationFlag = &cli.Uint64Flag{ Name: "rotate", Usage: "log rotation time (unit hour)", Value: 24, } // LogMaxAgeFlag --maxage LogMaxAgeFlag = &cli.Uint64Flag{ Name: "maxage", Usage: "log max age (unit hour)", Value: 720, } // VerbosityFlag -v|--verbosity VerbosityFlag = &cli.Uint64Flag{ Name: "verbosity", Aliases: []string{"v"}, Usage: "log verbosity (0:panic, 1:fatal, 2:error, 3:warn, 4:info, 5:debug, 6:trace)", Value: 4, } // JSONFormatFlag --json JSONFormatFlag = &cli.BoolFlag{ Name: "json", Usage: "output log in json format", } // ColorFormatFlag --color ColorFormatFlag = &cli.BoolFlag{ Name: "color", Usage: "output log in color text format", Value: true, } )
View Source
var (
// LicenseCommand license cubcommonad
LicenseCommand = &cli.Command{
Action: license,
Name: "license",
Usage: "Display license information",
ArgsUsage: " ",
}
)
View Source
var (
// VersionCommand version subcommand
VersionCommand = &cli.Command{
Action: version,
Name: "version",
Usage: "Print version numbers",
ArgsUsage: " ",
Description: `
The output of this command is supposed to be machine-readable.
`,
}
)
Functions ¶
func GetConfigFilePath ¶
func GetConfigFilePath(ctx *cli.Context) string
GetConfigFilePath specified by `-c|--config`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.