Skip to content

Commit

Permalink
Update docs (#27)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JDOsborne1 authored Jul 15, 2024
1 parent 2a0e5de commit e745d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ While this could be considered a beginner mistake, across time, multiple package

### Get Started

$ go get github.com/jgautheron/goconst/cmd/goconst
$ go install github.com/jgautheron/goconst/cmd/goconst@latest
$ goconst ./...

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

### Other static analysis tools
Expand Down
1 change: 1 addition & 0 deletions cmd/goconst/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Examples:
goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/...
goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach
goconst -numbers -min 60 -max 512 .
goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}')
`

var (
Expand Down

0 comments on commit e745d46

Please sign in to comment.