Documentation
¶
Overview ¶
Package cli consolidates flag and main function handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = Common{}
Default contains the default flags. Make a copy of this, do not reuse.
Functions ¶
Types ¶
type Command ¶
type Command interface { Name() string Main(ctx context.Context, args []string) IsDebug() bool RunDefaultServeMux() }
Command is a single command that can be parsed and run.
type Common ¶
type Common struct { Debug bool `long:"debug" env:"HB_DEBUG" description:"Enables debug mode and the debug log level"` DefaultServeMuxAddr string `` /* 149-byte string literal not displayed */ }
Common contains flags common to all commands.
func (*Common) RunDefaultServeMux ¶
func (c *Common) RunDefaultServeMux()
RunDefaultServeMux runs the global default HTTP mux in the background, if the addr has been set.
Directories
¶
Path | Synopsis |
---|---|
flags
|
|
botflags
Package botflags processes bot-related flags.
|
Package botflags processes bot-related flags. |
httpflags
Package httpflags provides HTTP client flags.
|
Package httpflags provides HTTP client flags. |
nsqflags
Package nsqflags processes NSQ-related flags.
|
Package nsqflags processes NSQ-related flags. |
promflags
Package promflags provides prometheus metric flags.
|
Package promflags provides prometheus metric flags. |
redisflags
Package redisflags processes redis-related flags.
|
Package redisflags processes redis-related flags. |
sqlflags
Package sqlflags processes SQL database related flags.
|
Package sqlflags processes SQL database related flags. |
twitchflags
Package twitchflags processes Twitch client related flags.
|
Package twitchflags processes Twitch client related flags. |
webflags
Package webflags proceses web server related flags.
|
Package webflags proceses web server related flags. |
subcommands
|
|
bot
Package bot implements the main command for the bot service.
|
Package bot implements the main command for the bot service. |
conduit
Package conduit implements the main command for the conduit service.
|
Package conduit implements the main command for the conduit service. |
web
Package web implements the main command for the web service.
|
Package web implements the main command for the web service. |
Click to show internal directories.
Click to hide internal directories.