Registry / utility / golangci-goconst

golangci-goconst

JSON →
library0.0.0-20180610141641-041c5f2b40f3gogounverified

Finds repeated strings that could be replaced by a constant in Go source code.

go get github.com/golangci/goconst
INSTALL
IMPORT
SIG · GOLANGCI-GOCONST
G
golangci-goconst
utilitygov0.0.0-20180610141641-041c5f2b40f3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

goconst
github.com/golangci/goconst

Runs goconst on the current directory and prints repeated strings.

package main import ( "fmt" "github.com/golangci/goconst" ) func main() { issues, _ := goconst.Run("./...", nil) for _, issue := range issues { fmt.Printf("%s:%d: %s\n", issue.Pos.Filename, issue.Pos.Line, issue.Str) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20180610141641-041c5f2b40f3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
golangci-goconst — go get golangci-goconst · libregistry