github.com/goliatone/go-envset@v0.7.0/cmd/envset/version/version.go (about)

     1  package version
     2  
     3  import (
     4  	"github.com/goliatone/go-envset/pkg/config"
     5  	"github.com/goliatone/go-envset/pkg/version"
     6  	"github.com/urfave/cli/v2"
     7  )
     8  
     9  //GetCommand returns a new cli.Command for the
    10  //version command
    11  func GetCommand(cnf *config.Config) *cli.Command {
    12  	return &cli.Command{
    13  		Name:  "version",
    14  		Usage: "return version information for envset program",
    15  		Action: func(ctx *cli.Context) error {
    16  			return version.Print(ctx.App.Writer)
    17  		},
    18  	}
    19  }