mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
22 lines
342 B
Go
22 lines
342 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Populated by goreleaser during build
|
|
var version = "latest"
|
|
|
|
func NewVersionCommand() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print version information",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println(version)
|
|
},
|
|
}
|
|
return cmd
|
|
}
|