Skip to content

linsite/go-format-args-check

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-format-args-check

The Go linter go-format-args-check checks that printf-like functions are named with f at the end.

For example, Printf should have exactly 3 args, but got 2. You'll get a error.

package main

import "log"

func main() {
	log.Printf("name: %s, age: %d, test: %s", "test", 3)
}
main.go:6:2: formatting function 'Printf' args should match % count

About

Linter checks that printf-like functions have matched % and args.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%