Browse Source

fix store pacakge pass go vet

Xiang Li 12 years ago
parent
commit
6803d077b9
3 changed files with 4 additions and 4 deletions
  1. 2 2
      store/compare_and_swap_command.go
  2. 1 1
      store/stats.go
  3. 1 1
      store/watcher_test.go

+ 2 - 2
store/compare_and_swap_command.go

@@ -16,8 +16,8 @@ type CompareAndSwapCommand struct {
 	Key        string    `json:"key"`
 	Key        string    `json:"key"`
 	Value      string    `json:"value"`
 	Value      string    `json:"value"`
 	ExpireTime time.Time `json:"expireTime"`
 	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
 // The name of the testAndSet command in the log

+ 1 - 1
store/stats.go

@@ -41,7 +41,7 @@ type Stats struct {
 
 
 	// Number of create requests
 	// Number of create requests
 	CreateSuccess uint64 `json:"createSuccess"`
 	CreateSuccess uint64 `json:"createSuccess"`
-	CreateFail    uint64 `json:createFail`
+	CreateFail    uint64 `json:"createFail"`
 
 
 	// Number of testAndSet requests
 	// Number of testAndSet requests
 	CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"`
 	CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"`

+ 1 - 1
store/watcher_test.go

@@ -9,7 +9,7 @@ func TestWatcher(t *testing.T) {
 	wh := s.WatcherHub
 	wh := s.WatcherHub
 	c, err := wh.watch("/foo", true, 1)
 	c, err := wh.watch("/foo", true, 1)
 	if err != nil {
 	if err != nil {
-		t.Fatal("%v", err)
+		t.Fatalf("%v", err)
 	}
 	}
 
 
 	select {
 	select {