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

@@ -8,9 +8,9 @@ import (
"time"
"github.com/imdario/mergo"
"github.com/micro/cli"
"github.com/micro/go-micro/config/cmd"
"github.com/micro/go-micro/config/source"
"github.com/micro/cli/v2"
)
type cliSource struct {
@@ -21,11 +21,6 @@ type cliSource struct {
func (c *cliSource) Read() (*source.ChangeSet, error) {
var changes map[string]interface{}
for _, name := range c.ctx.GlobalFlagNames() {
tmp := toEntry(name, c.ctx.GlobalGeneric(name))
mergo.Map(&changes, tmp) // need to sort error handling
}
for _, name := range c.ctx.FlagNames() {
tmp := toEntry(name, c.ctx.Generic(name))
mergo.Map(&changes, tmp) // need to sort error handling