diff options
author | Aaron M. Ucko <ucko@debian.org> | 2018-11-12 15:44:00 -0500 |
---|---|---|
committer | Aaron M. Ucko <ucko@debian.org> | 2018-11-12 15:44:00 -0500 |
commit | 6044751a4f30c5d03a2da98363ea1c55e64181fa (patch) | |
tree | ffc7c97e5a8f48ebe0dc884ac70a86df34951e9f /rchive.go | |
parent | 2642ceafbde6d9c6449a9d64fcdf6e01b94c45a8 (diff) |
New upstream version 10.0.20181004+ds
Diffstat (limited to 'rchive.go')
-rw-r--r-- | rchive.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -2744,7 +2744,7 @@ func SetFieldQualifiers(clauses []string, rlxd bool) []string { // SEARCH TERM LISTS FOR PHRASES OR NORMALIZED TERMS, OR MATCH BY PATTERN -func ProcessQuery(base, phrase string, xact, rlxd bool) int { +func ProcessSearch(base, phrase string, xact, rlxd bool) int { if phrase == "" { return 0 @@ -2771,7 +2771,7 @@ func ProcessMock(base, phrase string, xact, rlxd bool) int { return 0 } - fmt.Fprintf(os.Stdout, "ProcessQuery:\n\n%s\n\n", phrase) + fmt.Fprintf(os.Stdout, "ProcessSearch:\n\n%s\n\n", phrase) if xact { phrase = PrepareExact(phrase) @@ -3524,7 +3524,7 @@ func CreateInverter(nvrt string, inp <-chan string) <-chan []string { } // remove punctuation from term - content := strings.Map(func(c rune) rune { + content = strings.Map(func(c rune) rune { if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != ' ' && c != '-' && c != '_' { return -1 } @@ -5497,8 +5497,8 @@ func main() { // check for data being piped into stdin isPipe := false - fi, err := os.Stdin.Stat() - if err == nil { + fi, staterr := os.Stdin.Stat() + if staterr == nil { isPipe = bool((fi.Mode() & os.ModeNamedPipe) != 0) } @@ -5723,7 +5723,7 @@ func main() { if mock { recordCount = ProcessMock(base, phrs, xact, rlxd) } else { - recordCount = ProcessQuery(base, phrs, xact, rlxd) + recordCount = ProcessSearch(base, phrs, xact, rlxd) } debug.FreeOSMemory() @@ -6142,7 +6142,7 @@ func main() { recordCount++ runtime.Gosched() - _, err = os.Stdout.Write(data) + _, err := os.Stdout.Write(data) if err != nil { fmt.Fprintf(os.Stderr, "%s\n", err.Error()) } |