Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jirfag/go-printf-func-name
Linter checks that printf-like functions are named with `f` at the end.
https://github.com/jirfag/go-printf-func-name
Last synced: 4 months ago
JSON representation
Linter checks that printf-like functions are named with `f` at the end.
- Host: GitHub
- URL: https://github.com/jirfag/go-printf-func-name
- Owner: jirfag
- License: mit
- Created: 2019-11-09T19:02:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-06T06:57:17.000Z (8 months ago)
- Last Synced: 2024-08-03T17:09:45.956Z (6 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 20
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```go
package mainimport "log"
func myLog(format string, args ...interface{}) {
const prefix = "[my] "
log.Printf(prefix + format, args...)
}
```