Skip to content
Linter checks that printf-like functions are named with `f` at the end.
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/go-printf-func-name
pkg/analyzer
testdata/src/p
README.md
go.mod
go.sum

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.

For 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...)
}
You can’t perform that action at this time.