From ec5ac629cd526457ad48ee147d5b1b57304b867a Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Mon, 6 Nov 2017 14:48:35 -0600 Subject: [PATCH] porting the remaining changes from PR #897 --- executor_test.go | 6 +++--- handler.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/executor_test.go b/executor_test.go index 040248de9..67cd2c041 100644 --- a/executor_test.go +++ b/executor_test.go @@ -305,7 +305,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) { } else if !exists { t.Fatal("expected value to exist") } else if value != 25 { - t.Fatal("unexpected value: %v", value) + t.Fatalf("unexpected value: %v", value) } if value, exists, err := f.FieldValue(10, "field1"); err != nil { @@ -313,7 +313,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) { } else if !exists { t.Fatal("expected value to exist") } else if value != 2 { - t.Fatal("unexpected value: %v", value) + t.Fatalf("unexpected value: %v", value) } if value, exists, err := f.FieldValue(100, "field0"); err != nil { @@ -321,7 +321,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) { } else if !exists { t.Fatal("expected value to exist") } else if value != 10 { - t.Fatal("unexpected value: %v", value) + t.Fatalf("unexpected value: %v", value) } }) diff --git a/handler.go b/handler.go index 55b6e91d9..e3ad6422e 100644 --- a/handler.go +++ b/handler.go @@ -956,7 +956,7 @@ func (h *Handler) handleDeleteView(w http.ResponseWriter, r *http.Request) { // Delete the view. if err := f.DeleteView(viewName); err != nil { - // Ingore this error becuase views do not exist on all nodes due to slice distribution. + // Ingore this error because views do not exist on all nodes due to slice distribution. if err != ErrInvalidView { http.Error(w, err.Error(), http.StatusBadRequest) return @@ -1201,8 +1201,8 @@ func (h *Handler) handlePostImport(w http.ResponseWriter, r *http.Request) { // Validate that this handler owns the slice. if !h.Cluster.OwnsFragment(h.URI, req.Index, req.Slice) { - mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice) - http.Error(w, mesg, http.StatusPreconditionFailed) + msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice) + http.Error(w, msg, http.StatusPreconditionFailed) return } @@ -1271,8 +1271,8 @@ func (h *Handler) handlePostImportValue(w http.ResponseWriter, r *http.Request) // Validate that this handler owns the slice. if !h.Cluster.OwnsFragment(h.URI, req.Index, req.Slice) { - mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice) - http.Error(w, mesg, http.StatusPreconditionFailed) + msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice) + http.Error(w, msg, http.StatusPreconditionFailed) return } @@ -1337,8 +1337,8 @@ func (h *Handler) handleGetExportCSV(w http.ResponseWriter, r *http.Request) { // Validate that this handler owns the slice. if !h.Cluster.OwnsFragment(h.URI, index, slice) { - mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, index, slice) - http.Error(w, mesg, http.StatusPreconditionFailed) + msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, index, slice) + http.Error(w, msg, http.StatusPreconditionFailed) return } @@ -1796,7 +1796,7 @@ func (h *Handler) handlePostInputDefinition(w http.ResponseWriter, r *http.Reque return } - // Validation the input definition with the curent index's ColumnLabel. + // Validation the input definition with the current index's ColumnLabel. if err := req.Validate(index.ColumnLabel()); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return