ooni-probe-cli/internal/cli/version/version.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

19 lines
327 B
Go

package version
import (
"fmt"
"github.com/alecthomas/kingpin"
"github.com/ooni/probe-cli/internal/cli/root"
"github.com/ooni/probe-cli/internal/version"
)
func init() {
cmd := root.Command("version", "Show version.")
cmd.Action(func(_ *kingpin.ParseContext) error {
fmt.Println(version.Version)
return nil
})
}