You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: generator/cli/kallax/cmd.go
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,12 +20,16 @@ func main() {
20
20
cli.StringFlag{
21
21
Name: "input",
22
22
Value: ".",
23
-
Usage: "input package directory",
23
+
Usage: "Input package directory",
24
24
},
25
25
cli.StringFlag{
26
26
Name: "output",
27
27
Value: "kallax.go",
28
-
Usage: "output file name",
28
+
Usage: "Output file name",
29
+
},
30
+
cli.StringSliceFlag{
31
+
Name: "exclude, e",
32
+
Usage: "List of excluded files from the package when generating the code for your models. Use this to exclude files in your package that uses the generated code. You can use this flag as many times as you want.",
29
33
},
30
34
}
31
35
app.Action=generateModels
@@ -44,12 +48,13 @@ func main() {
44
48
funcgenerateModels(c*cli.Context) error {
45
49
input:=c.String("input")
46
50
output:=c.String("output")
51
+
excluded:=c.StringSlice("exclude")
47
52
48
53
if!isDirectory(input) {
49
54
returnfmt.Errorf("kallax: Input path should be a directory %s", input)
0 commit comments