dnote/cmd/version/version.go
Sung Won Cho 73c5c9ac67
Remove upgrade (#102)
* Remove upgrade

* Ask for upgrade

* Adopt installation script to unpack

* Remove unused
2018-09-02 16:54:29 +10:00

21 lines
391 B
Go

package version
import (
"fmt"
"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", ctx.Version)
},
}
return cmd
}