dnote/cmd/version/version.go
Sung Won Cho b3a12aed85
Deprecate upgrade (#99)
* Deprecate upgrade

* Automate using goreleaser

* Fix name and version

* Automate
2018-09-01 16:30:15 +10:00

22 lines
421 B
Go

package version
import (
"fmt"
"github.com/dnote/cli/core"
"github.com/dnote/cli/infra"
"github.com/spf13/cobra"
)
func NewCmd(ctx infra.DnoteCtx) *cobra.Command {
cmd := &cobra.Command{
Use: "version",
Short: "Print the version number of Dnote",
Long: "Print the version number of Dnote",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("dnote %s\n", core.Version)
},
}
return cmd
}