-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflags.go
80 lines (78 loc) · 1.66 KB
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package main
import "gopkg.in/urfave/cli.v2"
func setFlags() []cli.Flag {
return []cli.Flag{
&cli.BoolFlag{
Name: "verbose",
Value: false,
Aliases: []string{"v"},
Usage: "Verbose output",
},
&cli.BoolFlag{
Name: "quiet",
Value: false,
Aliases: []string{"q"},
Usage: "Quiet",
},
&cli.StringFlag{
Name: "machine",
Value: "",
Aliases: []string{"m"},
Usage: "Execute on machine",
},
&cli.BoolFlag{
Name: "all",
Value: false,
Aliases: []string{"a"},
Usage: "Execute on all machines",
},
&cli.StringFlag{
Name: "group",
Value: "",
Aliases: []string{"g"},
Usage: "Execute on group member",
},
&cli.StringFlag{
Name: "file",
Value: "",
Aliases: []string{"f"},
Usage: "Use the file as a list of machines",
},
&cli.StringFlag{
Name: "remoteshell",
Value: "",
Aliases: []string{"r"},
Usage: "Execute using shell (rsh/ssh)",
},
&cli.StringFlag{
Name: "remoteshellopt",
Value: "",
Aliases: []string{"o"},
Usage: "Option to give to shell",
},
&cli.BoolFlag{
Name: "wait-shell",
Value: false,
Aliases: []string{"w"},
Usage: "Sequentially execute shell",
},
&cli.BoolFlag{
Name: "concurrent-shell",
Value: false,
Aliases: []string{"c"},
Usage: "Execute shell concurrently",
},
&cli.BoolFlag{
Name: "show-machine-names",
Value: false,
Aliases: []string{"M"},
Usage: "Prepend the hostname on output",
},
&cli.BoolFlag{
Name: "hide-machine-names",
Value: false,
Aliases: []string{"H"},
Usage: "Do not prepend host name on output",
},
}
}