update micro/cli to urfave/cli/v2 and fix go-micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-01-25 13:41:25 +03:00
parent 1d00f2f771
commit e6a34bcbe7
14 changed files with 183 additions and 176 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"time"
"github.com/micro/cli"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/client/selector"
@@ -12,6 +11,7 @@ import (
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/server"
"github.com/micro/go-micro/transport"
"github.com/micro/cli/v2"
)
type Options struct {
@@ -166,7 +166,7 @@ func Flags(flags ...cli.Flag) Option {
}
}
func Action(a func(*cli.Context)) Option {
func Action(a func(*cli.Context) error) Option {
return func(o *Options) {
o.Cmd.App().Action = a
}