Skip to content

Commit e745d46

Browse files
authored
Update docs (#27)
* Update install instructions to use go install As per https://go.dev/doc/go-get-install-deprecation new users should use go install instead of go get to retrieve this tool * Include additional method for using tool with Workpaces This should also work fine when running from a single module
1 parent 2a0e5de commit e745d46

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ While this could be considered a beginner mistake, across time, multiple package
1010

1111
### Get Started
1212

13-
$ go get github.com/jgautheron/goconst/cmd/goconst
13+
$ go install github.com/jgautheron/goconst/cmd/goconst@latest
1414
$ goconst ./...
1515

1616
### Usage
@@ -40,6 +40,7 @@ Examples:
4040
goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/...
4141
goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
4242
goconst -numbers -min 60 -max 512 .
43+
goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}')
4344
```
4445

4546
### Other static analysis tools

cmd/goconst/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Examples:
3939
goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/...
4040
goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
4141
goconst -numbers -min 60 -max 512 .
42+
goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}')
4243
`
4344

4445
var (

0 commit comments

Comments
 (0)