You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
366 B
Go
22 lines
366 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
"github.com/webmeisterei/lql_api/version"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Prints the version",
|
|
Long: `Even I have a version`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("lql_api %s\n", version.Version)
|
|
},
|
|
}
|