contrib/raftexample: use bytes.Buffer.String (no 'string()')

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-07-18 16:06:22 -07:00
parent be8f102efb
commit 7c6a9a7317

View File

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