mirror of
https://github.com/go-kratos/kratos.git
synced 2025-02-11 13:38:46 +02:00
fix version conflict of urfave/cli (#540)
Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
This commit is contained in:
parent
6867172de7
commit
5475b62938
1
go.mod
1
go.mod
@ -46,7 +46,6 @@ require (
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
|
||||
github.com/tsuna/gohbase v0.0.0-20190502052937-24ffed0537aa
|
||||
github.com/urfave/cli v1.22.1
|
||||
github.com/urfave/cli/v2 v2.1.1
|
||||
go.etcd.io/etcd v0.0.0-20190917205325-a14579fbfb1a
|
||||
go.uber.org/atomic v1.4.0 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -285,8 +285,6 @@ github.com/tsuna/gohbase v0.0.0-20190502052937-24ffed0537aa/go.mod h1:3HfLQly3YN
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k=
|
||||
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
|
||||
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -12,22 +12,22 @@ func main() {
|
||||
app.Name = "protc"
|
||||
app.Usage = "protobuf生成工具"
|
||||
app.Flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
&cli.BoolFlag{
|
||||
Name: "bm",
|
||||
Usage: "whether to use BM for generation",
|
||||
Destination: &withBM,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
&cli.BoolFlag{
|
||||
Name: "grpc",
|
||||
Usage: "whether to use gRPC for generation",
|
||||
Destination: &withGRPC,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
&cli.BoolFlag{
|
||||
Name: "swagger",
|
||||
Usage: "whether to use swagger for generation",
|
||||
Destination: &withSwagger,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
&cli.BoolFlag{
|
||||
Name: "ecode",
|
||||
Usage: "whether to use ecode for generation",
|
||||
Destination: &withEcode,
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -27,7 +27,7 @@ func protocAction(ctx *cli.Context) (err error) {
|
||||
if err = checkProtoc(); err != nil {
|
||||
return err
|
||||
}
|
||||
files := []string(ctx.Args())
|
||||
files := ctx.Args().Slice()
|
||||
if len(files) == 0 {
|
||||
files, _ = filepath.Glob("*.proto")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user