mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-21 15:33:50 -07:00
Make fzf pass go vet
Add String() methods to types, so they can be printed with %s. Change some %s format specifiers to %v, when the default string representation is good enough. In Go 1.10, `go test` triggers a parallel `go vet`. So this also makes fzf pass `go test`. Close #1236 Close #1219
This commit is contained in:
committed by
Junegunn Choi
parent
24236860c8
commit
21b94d2de5
@@ -1,6 +1,7 @@
|
||||
package fzf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -34,6 +35,11 @@ type term struct {
|
||||
caseSensitive bool
|
||||
}
|
||||
|
||||
// String returns the string representation of a term.
|
||||
func (t term) String() string {
|
||||
return fmt.Sprintf("term{typ: %d, inv: %v, text: []rune(%q), caseSensitive: %v}", t.typ, t.inv, string(t.text), t.caseSensitive)
|
||||
}
|
||||
|
||||
type termSet []term
|
||||
|
||||
// Pattern represents search pattern
|
||||
|
Reference in New Issue
Block a user