-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathflag.go
52 lines (50 loc) · 1.17 KB
/
flag.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
package main
import "github.com/urfave/cli"
var flags = []cli.Flag{
cli.StringFlag{
Name: "pattern, p",
Value: "",
Usage: "Pattern to extract imports (example: '^import\\s+(\\S+)')",
},
cli.StringFlag{
Name: "module, m",
Value: "",
Usage: "Pattern to extract module names (example: '^module\\s+(\\S+)')",
},
cli.BoolFlag{
Name: "reverse",
Usage: "Assume reversed order; module names appear after dependant patterns",
},
cli.StringFlag{
Name: "start, s",
Value: "",
Usage: "Pattern to start matching",
},
cli.StringFlag{
Name: "end, e",
Value: "",
Usage: "Pattern to end matching",
},
cli.BoolFlag{
Name: "recursive, r",
Usage: "Recursively inspect files in subdirectories",
},
cli.StringFlag{
Name: "root",
Usage: "Regard the specified directory as the root directory of the modules",
},
cli.StringFlag{
Name: "format",
Value: "",
Usage: "Specify the format of the output; 'default', 'dot', 'csv', 'tsv' and 'json' are available.",
},
cli.StringFlag{
Name: "output, o",
Value: "",
Usage: "Output file. If omitted, stdout is used.",
},
cli.BoolFlag{
Name: "help, h",
Usage: "Shows the help of the command",
},
}