update cli and ocis-pkg (#14)

This commit is contained in:
Alex Unger
2020-02-10 11:51:41 +01:00
committed by GitHub
parent dd1c848408
commit 05b45e4802
14 changed files with 163 additions and 338 deletions
+3 -3
View File
@@ -4,14 +4,14 @@ import (
"fmt"
"net/http"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-konnectd/pkg/config"
"github.com/owncloud/ocis-konnectd/pkg/flagset"
)
// Health is the entrypoint for the health command.
func Health(cfg *config.Config) cli.Command {
return cli.Command{
func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
+4 -4
View File
@@ -4,11 +4,11 @@ import (
"os"
"strings"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-konnectd/pkg/config"
"github.com/owncloud/ocis-konnectd/pkg/flagset"
"github.com/owncloud/ocis-konnectd/pkg/version"
"github.com/owncloud/ocis-pkg/log"
"github.com/owncloud/ocis-pkg/v2/log"
"github.com/spf13/viper"
)
@@ -22,7 +22,7 @@ func Execute() error {
Usage: "Serve Konnectd API for oCIS",
Compiled: version.Compiled(),
Authors: []cli.Author{
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
@@ -73,7 +73,7 @@ func Execute() error {
return nil
},
Commands: []cli.Command{
Commands: []*cli.Command{
Server(cfg),
Health(cfg),
},
+3 -3
View File
@@ -10,7 +10,7 @@ import (
"contrib.go.opencensus.io/exporter/jaeger"
"contrib.go.opencensus.io/exporter/ocagent"
"contrib.go.opencensus.io/exporter/zipkin"
"github.com/micro/cli"
"github.com/micro/cli/v2"
"github.com/oklog/run"
openzipkin "github.com/openzipkin/zipkin-go"
zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
@@ -24,8 +24,8 @@ import (
)
// Server is the entrypoint for the server command.
func Server(cfg *config.Config) cli.Command {
return cli.Command{
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),