ooni-probe-cli/internal/cli/app/app.go
Simone Basso bc85efa6e5
refactor: version is now an internal package (#167)
Like for previous commits, just refactoring/yak shaving.
2020-11-13 17:37:06 +01:00

21 lines
381 B
Go

package app
import (
"os"
"github.com/apex/log"
"github.com/ooni/probe-cli/internal/cli/root"
"github.com/ooni/probe-cli/internal/version"
)
// Run the app. This is the main app entry point
func Run() {
root.Cmd.Version(version.Version)
_, err := root.Cmd.Parse(os.Args[1:])
if err != nil {
log.WithError(err).Error("failure in main command")
os.Exit(2)
}
return
}