dnote/cmd/version/version.go
Sung Won Cho fa1da50fc5
Implement state-based sync (#144)
* Migrate uuids of books that already exist in server

* Remove actions

* Add dirty flag for notes and books

* Drop actions table

* Implement sync

* Add debug

* Update uuid after posting resources to the server

* Fix dev script
2018-12-02 11:04:16 +10:00

22 lines
431 B
Go

package version
import (
"fmt"
"github.com/dnote/cli/infra"
"github.com/spf13/cobra"
)
// NewCmd returns a new version command
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
}