Files
opencloud/services/sse/pkg/command/version.go
Jörn Friedrich Dreyer b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00

28 lines
622 B
Go

package command
import (
"fmt"
"github.com/opencloud-eu/opencloud/pkg/version"
"github.com/urfave/cli/v2"
"github.com/opencloud-eu/opencloud/services/sse/pkg/config"
)
// Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running service instances",
Category: "info",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.GetString())
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")
return nil
},
}
}