mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
make linter happy
This commit is contained in:
parent
5f4c5d4d35
commit
5e102154ca
2 changed files with 6 additions and 8 deletions
|
|
@ -782,11 +782,9 @@ func (h *Handler) handlePostField(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
_, err = h.api.CreateField(r.Context(), indexName, fieldName, fos...)
|
||||
if err != nil {
|
||||
if _, ok := err.(pilosa.BadRequestError); ok {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if _, ok := err.(pilosa.BadRequestError); ok {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
resp.write(w, err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ func TestHandler_Endpoints(t *testing.T) {
|
|||
t.Fatalf("unexpected status code: %d", w.Code)
|
||||
}
|
||||
rsp := getSchemaResponse{}
|
||||
if err := json.Unmarshal([]byte(w.Body.String()), &rsp); err != nil {
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &rsp); err != nil {
|
||||
t.Fatalf("json decode: %s", err)
|
||||
}
|
||||
field := rsp.findField("i0", fieldName)
|
||||
|
|
@ -586,7 +586,7 @@ func TestHandler_Endpoints(t *testing.T) {
|
|||
t.Fatalf("unexpected status code: %d", w.Code)
|
||||
}
|
||||
rsp := getSchemaResponse{}
|
||||
if err := json.Unmarshal([]byte(w.Body.String()), &rsp); err != nil {
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &rsp); err != nil {
|
||||
t.Fatalf("json decode: %s", err)
|
||||
}
|
||||
field := rsp.findField("i0", fieldName)
|
||||
|
|
@ -615,7 +615,7 @@ func TestHandler_Endpoints(t *testing.T) {
|
|||
t.Fatalf("unexpected status code: %d", w.Code)
|
||||
}
|
||||
rsp := getSchemaResponse{}
|
||||
if err := json.Unmarshal([]byte(w.Body.String()), &rsp); err != nil {
|
||||
if err := json.Unmarshal(w.Body.Bytes(), &rsp); err != nil {
|
||||
t.Fatalf("json decode: %s", err)
|
||||
}
|
||||
field := rsp.findField("i0", fieldName)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue