mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 10:40:30 -05:00
26 lines
614 B
Go
26 lines
614 B
Go
package command
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/opencloud-eu/opencloud/pkg/version"
|
|
"github.com/opencloud-eu/opencloud/services/sse/pkg/config"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Version prints the service versions of all running instances.
|
|
func Version(cfg *config.Config) *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "version",
|
|
Short: "print the version of this binary and the running service instances",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
fmt.Println("Version: " + version.GetString())
|
|
fmt.Printf("Compiled: %s\n", version.Compiled())
|
|
fmt.Println("")
|
|
|
|
return nil
|
|
},
|
|
}
|
|
}
|