diff --git a/server/registry.go b/server/registry.go index fa63b5027..75b0e98c9 100644 --- a/server/registry.go +++ b/server/registry.go @@ -46,7 +46,7 @@ func (r *Registry) Register(name string, peerVersion string, peerURL string, url key := path.Join(RegistryKey, name) value := fmt.Sprintf("raft=%s&etcd=%s&raftVersion=%s", peerURL, url, peerVersion) _, err := r.store.Create(key, value, false, store.Permanent, commitIndex, term) - log.Debugf("Register: %s (%v)", name, err) + log.Debugf("Register: %s", name) return err } @@ -60,7 +60,7 @@ func (r *Registry) Unregister(name string, commitIndex uint64, term uint64) erro // Remove the key from the store. _, err := r.store.Delete(path.Join(RegistryKey, name), false, commitIndex, term) - log.Debugf("Unregister: %s (%v)", name, err) + log.Debugf("Unregister: %s", name) return err } diff --git a/store/compare_and_swap_command.go b/store/compare_and_swap_command.go index c4bfee569..8ee119f36 100644 --- a/store/compare_and_swap_command.go +++ b/store/compare_and_swap_command.go @@ -16,8 +16,8 @@ type CompareAndSwapCommand struct { Key string `json:"key"` Value string `json:"value"` ExpireTime time.Time `json:"expireTime"` - PrevValue string `json: prevValue` - PrevIndex uint64 `json: prevIndex` + PrevValue string `json:"prevValue"` + PrevIndex uint64 `json:"prevIndex"` } // The name of the testAndSet command in the log diff --git a/store/stats.go b/store/stats.go index 5f4d26d91..c18f5cbf0 100644 --- a/store/stats.go +++ b/store/stats.go @@ -41,7 +41,7 @@ type Stats struct { // Number of create requests CreateSuccess uint64 `json:"createSuccess"` - CreateFail uint64 `json:createFail` + CreateFail uint64 `json:"createFail"` // Number of testAndSet requests CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"` diff --git a/store/watcher_test.go b/store/watcher_test.go index 61da92f7c..c3da475fc 100644 --- a/store/watcher_test.go +++ b/store/watcher_test.go @@ -9,7 +9,7 @@ func TestWatcher(t *testing.T) { wh := s.WatcherHub c, err := wh.watch("/foo", true, 1) if err != nil { - t.Fatal("%v", err) + t.Fatalf("%v", err) } select {