mirror of
https://github.com/golangci/go-printf-func-name
synced 2026-09-06 08:26:14 +00:00
No description
- Go 92.8%
- Makefile 7.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| cmd/go-printf-func-name | ||
| pkg/analyzer | ||
| testdata/src/p | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
go-printf-func-name
The Go linter go-printf-func-name checks that printf-like functions are named with f at the end.
Example
myLog should be named myLogf by Go convention:
package main
import "log"
func myLog(format string, args ...interface{}) {
const prefix = "[my] "
log.Printf(prefix + format, args...)
}
$ go vet -vettool=$(which go-printf-func-name) ./...
./main.go:5:1: printf-like formatting function 'myLog' should be named 'myLogf'