For a minimal usage example see the following file set:
cd $GOPATH/src/github.com/gigawattio/go-commons/pkg/web/cli/example
go run example.go
Output:
Successfully started web service on addr=127.0.0.1:8080
^C
Interrupt signal detected, shutting down..
A few variables in the package gopkg.in/urface/cli.v2
do get temporarily overridden during the invocation of Cli.Main()
until the function is done running. The overrides are:
- cliv2.OsExiter is temporarily set to a NOP function.
- cliv2.ErrWriter is temporarily set to the value of
Cli.App.ErrWriter
.