chore(cli): upgrade urfave/cli to v2 version (#85)

chore(cli): upgrade urfave/cli to v2 version

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
appleboy
2020-01-04 17:44:25 +00:00
committed by Andrew Thornton
parent 0a5cdd60ac
commit c20d7d45aa
57 changed files with 2151 additions and 1776 deletions

View File

@@ -7,7 +7,7 @@ package cmd
import (
"log"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
)
// create global variables for global Flags to simplify
@@ -52,8 +52,8 @@ var OutputFlag = cli.StringFlag{
// subcommand to work around issue and provide --login and --output:
// https://github.com/urfave/cli/issues/585
var LoginOutputFlags = []cli.Flag{
LoginFlag,
OutputFlag,
&LoginFlag,
&OutputFlag,
}
// LoginRepoFlags defines login and repo flags that should
@@ -61,9 +61,9 @@ var LoginOutputFlags = []cli.Flag{
// the subcommand to work around issue and provide --login and --repo:
// https://github.com/urfave/cli/issues/585
var LoginRepoFlags = []cli.Flag{
LoginFlag,
RepoFlag,
RemoteFlag,
&LoginFlag,
&RepoFlag,
&RemoteFlag,
}
// AllDefaultFlags defines flags that should be available
@@ -71,8 +71,8 @@ var LoginRepoFlags = []cli.Flag{
// to work around issue and provide --login, --repo and --output:
// https://github.com/urfave/cli/issues/585
var AllDefaultFlags = append([]cli.Flag{
RepoFlag,
RemoteFlag,
&RepoFlag,
&RemoteFlag,
}, LoginOutputFlags...)
// initCommand returns repository and *Login based on flags