summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJulien Dessaux2024-03-26 21:11:29 +0100
committerJulien Dessaux2024-03-26 21:11:29 +0100
commite389a0e9255ab898ea20a85658fc5ba6e695bb51 (patch)
tree92904a08c4435eaeec9ab8cfe026a158033939c9 /main.go
parentfeat(ods): implement basic ods functionality (diff)
downloadods-e389a0e9255ab898ea20a85658fc5ba6e695bb51.tar.gz
ods-e389a0e9255ab898ea20a85658fc5ba6e695bb51.tar.bz2
ods-e389a0e9255ab898ea20a85658fc5ba6e695bb51.zip
feat(ods): trim spaces around the searched word
Diffstat (limited to '')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3afc7cc..6fe702d 100644
--- a/main.go
+++ b/main.go
@@ -51,7 +51,7 @@ func postIndex() http.Handler {
Query: r.FormValue("query"),
Invalid: true,
}
- query := strings.ToUpper(data.Query)
+ query := strings.TrimSpace(strings.ToUpper(data.Query))
for _, w := range words {
if w == query {
data.Invalid = false