Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 months ago
JSON representation

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

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 main

import "log"

func myLog(format string, args ...interface{}) {
const prefix = "[my] "
log.Printf(prefix + format, args...)
}
```