fix: downgrade urfave/cli to v1 to enable more flexible parsing (#154)

This commit is contained in:
Daniel Moran
2021-06-28 14:49:26 -04:00
committed by GitHub
parent 72d1ad8361
commit ead44e4e83
29 changed files with 534 additions and 639 deletions

View File

@ -1,13 +1,11 @@
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/influxdata/influx-cli/v2/pkg/signals"
"github.com/urfave/cli/v2"
"github.com/urfave/cli"
)
// Fields set via ldflags at build time.
@ -30,7 +28,7 @@ var app = cli.App{
Usage: "Influx Client",
UsageText: "influx [command]",
EnableBashCompletion: true,
Commands: []*cli.Command{
Commands: []cli.Command{
newVersionCmd(),
newPingCmd(),
newSetupCmd(),
@ -52,11 +50,11 @@ var app = cli.App{
newSecretCommand(),
newV1SubCommand(),
},
Before: withContext(),
}
func main() {
ctx := signals.WithStandardSignals(context.Background())
if err := app.RunContext(ctx, os.Args); err != nil {
if err := app.Run(os.Args); err != nil {
_, _ = fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}