Move printedFull closer to its use, document
This commit is contained in:
parent
67f81d2728
commit
5694cc5194
9
file.go
9
file.go
|
@ -68,6 +68,15 @@ func (nptf *notPlainTextFlag) Type() string {
|
||||||
return "short|full|skip" // ???
|
return "short|full|skip" // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// printedFull is set by file() if it prints a full file's matches
|
||||||
|
// (i.e. a header line, then the match lines). It is cleared if we
|
||||||
|
// just printed a "Binary file <foo> matches" line. It lets us have a
|
||||||
|
// nice one-line separator between full files, but show the binary
|
||||||
|
// matches compactly.
|
||||||
|
printedFull bool
|
||||||
|
)
|
||||||
|
|
||||||
func file(path string, data []byte) {
|
func file(path string, data []byte) {
|
||||||
var short string
|
var short string
|
||||||
isBinary, isMinified := notPlainText(data)
|
isBinary, isMinified := notPlainText(data)
|
||||||
|
|
Loading…
Reference in New Issue