diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 21:59:25 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | e18e81f5eb8eebf80f6e597c2d52823bb2c8ff14 (patch) | |
tree | 6ffb247d42e09a0e3c992f14dd9e73f1a0a6da90 /pkg/i18n/english.go | |
parent | 67a446234c678fe56f1c209b8b75d511cc2d1d94 (diff) |
don't pass single commands directly to RunCommand (or equivalent function)
when it contains percentages.
This is a really strange one. It's a linting warning in my editor
and it doesn't stop me from compiling, but it breaks `go test`.
A basic file to reproduce what I'm talking about:
package main
import "fmt"
func main() {
notSprintf("test %s") // compiler complains here thinking %s needs a corresponding argument
}
func notSprintf(formatStr string, formatArgs ...interface{}) string {
if formatArgs != nil {
return formatStr
}
return fmt.Sprintf(formatStr, formatArgs...)
}
Diffstat (limited to 'pkg/i18n/english.go')
0 files changed, 0 insertions, 0 deletions