simplify commands and version handling

This commit is contained in:
Willy Kloucek
2022-01-03 13:53:27 +01:00
parent eee0d0c4c8
commit e0656daaa0
41 changed files with 437 additions and 499 deletions
+5
View File
@@ -7,6 +7,7 @@ import (
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/urfave/cli/v2"
mreg "go-micro.dev/v4/registry"
@@ -19,6 +20,10 @@ func VersionCommand(cfg *config.Config) *cli.Command {
Usage: "Lists running services with version",
Category: "Runtime",
Action: func(c *cli.Context) error {
fmt.Println("Version: " + version.String)
fmt.Printf("Compiled: %s\n", version.Compiled())
fmt.Println("")
reg := registry.GetRegistry()
serviceList, err := reg.ListServices()
if err != nil {