ctlv2: use urfave/cli in ctlv2

release-3.0
Gyu-Ho Lee 2016-06-20 15:06:52 -07:00
parent c4df15ff3e
commit 0ae9d444f9
21 changed files with 26 additions and 22 deletions

View File

@ -19,8 +19,8 @@ import (
"os"
"strings"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
func NewAuthCommands() cli.Command {

View File

@ -21,13 +21,13 @@ import (
"path"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/idutil"
"github.com/coreos/etcd/pkg/pbutil"
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/wal"
"github.com/coreos/etcd/wal/walpb"
"github.com/urfave/cli"
)
func NewBackupCommand() cli.Command {

View File

@ -23,8 +23,8 @@ import (
"os/signal"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
"golang.org/x/net/context"
)

View File

@ -21,8 +21,8 @@ import (
"os/exec"
"os/signal"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
"golang.org/x/net/context"
)

View File

@ -19,8 +19,8 @@ import (
"fmt"
"os"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewGetCommand returns the CLI command for "get".

View File

@ -22,9 +22,9 @@ import (
"sync"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/store"
"github.com/urfave/cli"
"golang.org/x/net/context"
)

View File

@ -17,8 +17,8 @@ package command
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
func NewLsCommand() cli.Command {

View File

@ -19,7 +19,7 @@ import (
"os"
"strings"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
)
func NewMemberCommand() cli.Command {

View File

@ -19,8 +19,8 @@ import (
"os"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewMakeCommand returns the CLI command for "mk".

View File

@ -18,8 +18,8 @@ import (
"errors"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewMakeDirCommand returns the CLI command for "mkdir".

View File

@ -17,8 +17,8 @@ package command
import (
"errors"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewRemoveCommand returns the CLI command for "rm".

View File

@ -17,8 +17,8 @@ package command
import (
"errors"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewRemoveDirCommand returns the CLI command for "rmdir".

View File

@ -20,9 +20,9 @@ import (
"reflect"
"strings"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/pathutil"
"github.com/urfave/cli"
)
func NewRoleCommands() cli.Command {

View File

@ -19,8 +19,8 @@ import (
"os"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewSetCommand returns the CLI command for "set".

View File

@ -15,8 +15,8 @@
package command
import (
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewSetDirCommand returns the CLI command for "setDir".

View File

@ -19,8 +19,8 @@ import (
"os"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewUpdateCommand returns the CLI command for "update".

View File

@ -18,8 +18,8 @@ import (
"errors"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
// NewUpdateDirCommand returns the CLI command for "updatedir".

View File

@ -20,8 +20,8 @@ import (
"strings"
"github.com/bgentry/speakeasy"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
)
func NewUserCommands() cli.Command {

View File

@ -28,9 +28,9 @@ import (
"time"
"github.com/bgentry/speakeasy"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/transport"
"github.com/urfave/cli"
"golang.org/x/net/context"
)

View File

@ -20,8 +20,8 @@ import (
"os"
"os/signal"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/client"
"github.com/urfave/cli"
"golang.org/x/net/context"
)

View File

@ -20,9 +20,9 @@ import (
"os"
"time"
"github.com/codegangsta/cli"
"github.com/coreos/etcd/etcdctl/ctlv2/command"
"github.com/coreos/etcd/version"
"github.com/urfave/cli"
)
func Start() {
@ -71,5 +71,9 @@ func Start() {
command.NewAuthCommands(),
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}