Merge pull request #840 from owncloud/ocis-1018

Tweak go-micro behavior
This commit is contained in:
Alex Unger
2020-11-12 13:59:12 +01:00
committed by GitHub
27 changed files with 248 additions and 71 deletions
+3 -2
View File
@@ -4,8 +4,9 @@ import (
"fmt"
"os"
"github.com/owncloud/ocis/ocis-pkg/registry"
"github.com/micro/cli/v2"
"github.com/micro/go-micro/v2/registry/mdns"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/webdav/pkg/config"
"github.com/owncloud/ocis/webdav/pkg/flagset"
@@ -18,7 +19,7 @@ func PrintVersion(cfg *config.Config) *cli.Command {
Usage: "Print the versions of the running instances",
Flags: flagset.ListWebdavWithConfig(cfg),
Action: func(c *cli.Context) error {
reg := mdns.NewRegistry()
reg := *registry.GetRegistry()
services, err := reg.GetService(cfg.Service.Namespace + "." + cfg.Service.Name)
if err != nil {
fmt.Println(fmt.Errorf("could not get webdav services from the registry: %v", err))