@@ -2,36 +2,29 @@ package cmds
2
2
3
3
import (
4
4
"flag"
5
- "log"
6
5
"os"
7
6
7
+ "github.com/appscode/go/flags"
8
8
"github.com/appscode/go/log/golog"
9
9
v "github.com/appscode/go/version"
10
10
"github.com/appscode/kutil/tools/cli"
11
11
api "github.com/appscode/stash/apis/stash/v1alpha1"
12
12
"github.com/appscode/stash/client/clientset/versioned/scheme"
13
13
"github.com/appscode/stash/pkg/util"
14
14
"github.com/spf13/cobra"
15
- "github.com/spf13/pflag"
16
15
genericapiserver "k8s.io/apiserver/pkg/server"
17
16
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
18
17
"k8s.io/kubernetes/pkg/api/legacyscheme"
19
18
)
20
19
21
- const (
22
- gaTrackingCode = "UA-62096468-20"
23
- )
24
-
25
20
func NewRootCmd () * cobra.Command {
26
21
var rootCmd = & cobra.Command {
27
22
Use : "stash" ,
28
23
Short : `Stash by AppsCode - Backup your Kubernetes Volumes` ,
29
24
Long : `Stash is a Kubernetes operator for restic. For more information, visit here: https://appscode.com/products/stash` ,
30
25
DisableAutoGenTag : true ,
31
26
PersistentPreRun : func (c * cobra.Command , args []string ) {
32
- c .Flags ().VisitAll (func (flag * pflag.Flag ) {
33
- log .Printf ("FLAG: --%s=%q" , flag .Name , flag .Value )
34
- })
27
+ flags .DumpAll (c .Flags ())
35
28
cli .SendAnalytics (c , v .Version .Version )
36
29
37
30
scheme .AddToScheme (clientsetscheme .Scheme )
0 commit comments