1
0
mirror of https://github.com/TomWright/dasel.git synced 2022-05-22 02:32:45 +03:00
Files
dasel-data-selector/internal/command/version.go
2020-09-22 12:26:37 +01:00

21 lines
356 B
Go

package command
import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel/internal"
)
func versionCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "version",
Short: "Prints the dasel version.",
Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(internal.Version)
},
}
return cmd
}