github.com/vlifesystems/rulehunter@v0.0.0-20180501090014-673078aa4a83/cmd/version.go (about) 1 // Copyright (C) 2016-2017 vLife Systems Ltd <http://vlifesystems.com> 2 // Licensed under an MIT licence. Please see LICENSE.md for details. 3 4 package cmd 5 6 import ( 7 "fmt" 8 9 "github.com/spf13/cobra" 10 "github.com/vlifesystems/rulehunter/version" 11 ) 12 13 var VersionCmd = &cobra.Command{ 14 Use: "version", 15 Short: "Report version of Rulehunter", 16 Long: "Report version of Rulehunter", 17 Run: func(cmd *cobra.Command, args []string) { 18 fmt.Printf("Rulehunter v%s\n", version.Version()) 19 }, 20 }