1
0
mirror of https://github.com/Luzifer/password.git synced 2024-09-19 18:32:57 +00:00
password/cmd/password/cmdVersion.go
Knut Ahlers eed2ae8b08
Breaking: Password v2.0.0 (#5)
- Fix broken vendoring for library users (closes #4)
	- Move command to `cmd/password` subdir
- Drop support for Alfred workflow
- Add support for Go 1.11+ modules
2019-02-28 19:51:33 +01:00

23 lines
378 B
Go

package main
import (
"fmt"
"github.com/spf13/cobra"
)
func getCmdVersion() *cobra.Command {
cmd := cobra.Command{
Use: "version",
Aliases: []string{"v"},
Short: "prints the current version of password",
Run: actionCmdVersion,
}
return &cmd
}
func actionCmdVersion(cmd *cobra.Command, args []string) {
fmt.Printf("password version %s\n", version)
}