diff --git a/evaluator/evaluator.go b/evaluator/evaluator.go index 4e7e3d7..06c3ebf 100644 --- a/evaluator/evaluator.go +++ b/evaluator/evaluator.go @@ -17,7 +17,7 @@ func main() { searchQuery := r.URL.Query().Get("query") searchEngine := r.URL.Query().Get("engine") - if (searchQuery == "" || searchEngine == "") { + if searchQuery == "" || searchEngine == "" { http.Error(w, "400 Bad Request", http.StatusBadRequest) return } @@ -33,7 +33,7 @@ func main() { func loadBangs() (bangs map[string]string) { data, err := ioutil.ReadFile("bangs.json") - if err != nil { + if err != nil { log.Fatalf("Failed to read bangs: %v", err) } @@ -75,7 +75,7 @@ func evaluateBang(searchQuery string, searchEngine string) (query string, engine bang, query := parseBang(searchQuery) engine = bangs[bang] - if (bang == "" || engine == ""){ + if bang == "" || engine == "" { return searchQuery, searchEngine } else { return query, engine