Browse Source

Merge pull request #8279 from gyuho/aaa

contrib/raftexample: use bytes.Buffer.String (no 'string()')
Gyu-Ho Lee 8 years ago
parent
commit
9dc65936b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contrib/raftexample/kvstore.go

+ 1 - 1
contrib/raftexample/kvstore.go

@@ -58,7 +58,7 @@ func (s *kvstore) Propose(k string, v string) {
 	if err := gob.NewEncoder(&buf).Encode(kv{k, v}); err != nil {
 		log.Fatal(err)
 	}
-	s.proposeC <- string(buf.Bytes())
+	s.proposeC <- buf.String()
 }
 
 func (s *kvstore) readCommits(commitC <-chan *string, errorC <-chan error) {