fix issues identified by go vet
This commit is contained in:
parent
d164b017b2
commit
e15cdf608f
|
@ -34,7 +34,7 @@ func (h *CreateIndexHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
|
|||
// find the name of the index to create
|
||||
indexName := mux.Vars(req)["indexName"]
|
||||
if indexName == "" {
|
||||
showError(w, req, fmt.Sprintf("index name is required", indexName), 400)
|
||||
showError(w, req, "index name is required", 400)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func (h *DeleteIndexHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
|
|||
// find the name of the index to delete
|
||||
indexName := mux.Vars(req)["indexName"]
|
||||
if indexName == "" {
|
||||
showError(w, req, fmt.Sprintf("index name is required", indexName), 400)
|
||||
showError(w, req, "index name is required", 400)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ func (h *GetIndexHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
// find the name of the index to create
|
||||
indexName := mux.Vars(req)["indexName"]
|
||||
if indexName == "" {
|
||||
showError(w, req, fmt.Sprintf("index name is required", indexName), 400)
|
||||
showError(w, req, "index name is required", 400)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue