@@ -18,7 +18,7 @@ While this could be considered a beginner mistake, across time, multiple package
18
18
```
19
19
Usage:
20
20
21
- goconst ARGS <directory>
21
+ goconst ARGS <directory> [<directory>...]
22
22
23
23
Flags:
24
24
@@ -27,13 +27,15 @@ Flags:
27
27
-ignore-tests exclude tests from the search (default: true)
28
28
-min-occurrences report from how many occurrences (default: 2)
29
29
-min-length only report strings with the minimum given length (default: 3)
30
- -match-constant look for existing constants matching the values
30
+ -match-constant look for existing constants matching the strings
31
31
-find-duplicates look for constants with identical values
32
+ -eval-const-expr enable evaluation of constant expressions (e.g., Prefix + "suffix")
32
33
-numbers search also for duplicated numbers
33
- -min minimum value, only works with -numbers
34
- -max maximum value, only works with -numbers
34
+ -min minimum value, only works with -numbers
35
+ -max maximum value, only works with -numbers
35
36
-output output formatting (text or json)
36
37
-set-exit-status Set exit status to 2 if any issues are found
38
+ -grouped print single line per match, only works with -output text
37
39
38
40
Examples:
39
41
@@ -42,6 +44,7 @@ Examples:
42
44
goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
43
45
goconst -numbers -min 60 -max 512 .
44
46
goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}')
47
+ goconst -eval-const-expr -match-constant . # Matches constant expressions like Prefix + "suffix"
45
48
```
46
49
47
50
### Development
0 commit comments