Show HN: Go (style) linter for dangling package-level functions
Category: devtools
Tags: go, linter, static-analysis, golangci-lint, refactoring
Score: 5.5/10 (Innovation: 5, Technical: 6, Documentation: 7, Utility: 4)
go-ownfunc is a Go static-analysis linter that flags unexported package-level functions whose only callers are methods of a single receiver type, suggesting they become methods instead. It integrates with golangci-lint as a plugin and ships as a standalone analyzer, with configurable thresholds, ignore lists, and automated fixes that rewrite call sites including recursive calls.
Target audience: backend devs
Repository: https://github.com/nfx/go-ownfunc · Go · Apache-2.0 · 3 stars
View on Hacker News