github.com/orteth01/up@v0.2.0/internal/cli/version/version.go (about)

     1  package version
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/tj/kingpin"
     7  
     8  	"github.com/apex/up/internal/cli/root"
     9  	"github.com/apex/up/internal/stats"
    10  )
    11  
    12  func init() {
    13  	cmd := root.Command("version", "Show version.")
    14  	cmd.Action(func(_ *kingpin.ParseContext) error {
    15  		stats.Track("Show Version", nil)
    16  		fmt.Println(root.Cmd.GetVersion())
    17  		return nil
    18  	})
    19  }