Skip to content

Commit 51a865b

Browse files
authored
docs: update usage in README (#40)
1 parent 75b83e9 commit 51a865b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ While this could be considered a beginner mistake, across time, multiple package
1818
```
1919
Usage:
2020
21-
goconst ARGS <directory>
21+
goconst ARGS <directory> [<directory>...]
2222
2323
Flags:
2424
@@ -27,13 +27,15 @@ Flags:
2727
-ignore-tests exclude tests from the search (default: true)
2828
-min-occurrences report from how many occurrences (default: 2)
2929
-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
3131
-find-duplicates look for constants with identical values
32+
-eval-const-expr enable evaluation of constant expressions (e.g., Prefix + "suffix")
3233
-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
3536
-output output formatting (text or json)
3637
-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
3739
3840
Examples:
3941
@@ -42,6 +44,7 @@ Examples:
4244
goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
4345
goconst -numbers -min 60 -max 512 .
4446
goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}')
47+
goconst -eval-const-expr -match-constant . # Matches constant expressions like Prefix + "suffix"
4548
```
4649

4750
### Development

0 commit comments

Comments
 (0)