### Install and Run goconst Source: https://github.com/jgautheron/goconst/blob/master/README.md Install the goconst tool using go install and then run it on your Go project directories. ```bash go install github.com/jgautheron/goconst/cmd/goconst@latest goconst ./... ``` -------------------------------- ### goconst Usage Examples Source: https://github.com/jgautheron/goconst/blob/master/README.md Demonstrates various ways to use the goconst command-line tool with different flags to customize the analysis. ```bash goconst ./... ``` ```bash goconst -ignore "yacc|\.pb\." $GOPATH/src/github.com/cockroachdb/cockroach/... ``` ```bash goconst -min-occurrences 3 -output json $GOPATH/src/github.com/cockroachdb/cockroach ``` ```bash goconst -numbers -min 60 -max 512 . ``` ```bash goconst -min-occurrences 5 $(go list -m -f '{{.Dir}}') ``` ```bash goconst -eval-const-expr -match-constant . # Matches constant expressions like Prefix + "suffix" ``` ```bash goconst -ignore-calls slog.Info,slog.Warn,fmt.Errorf ./... # Ignore strings in logging/error calls ``` -------------------------------- ### Run Go Tests Source: https://github.com/jgautheron/goconst/blob/master/README.md Commands to execute the test suite for the goconst project, including options for verbose output, race detection, and benchmarks. ```bash go test ./... ``` ```bash go test -v ./... ``` ```bash go test -race ./... ``` ```bash go test -bench=. ./... ``` ```bash go test -cover ./... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.