Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Linter checks that printf-like functions are named with `f` at the end.

License

NotificationsYou must be signed in to change notification settings

golangci/go-printf-func-name

Repository files navigation

The Go lintergo-printf-func-name checks that printf-like functions are named withf at the end.

Example

myLog should be namedmyLogf by Go convention:

package mainimport"log"funcmyLog(formatstring,args...interface{}) {constprefix="[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'

About

Linter checks that printf-like functions are named with `f` at the end.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp