Trim space on input to make searching more robust.

R=rsc, r, gri
CC=golang-dev
https://golang.org/cl/186255
This commit is contained in:
Christopher Wedgwood 2010-01-22 14:26:15 +11:00 committed by Rob Pike
parent cd47c903e2
commit 2a57a5c9c7
1 changed files with 1 additions and 1 deletions

View File

@ -1157,7 +1157,7 @@ type SearchResult struct {
}
func search(c *http.Conn, r *http.Request) {
query := r.FormValue("q")
query := strings.TrimSpace(r.FormValue("q"))
var result SearchResult
if index, timestamp := searchIndex.get(); index != nil {