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

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
release-3.2
Gyu-Ho Lee 2017-07-18 16:06:22 -07:00
parent be8f102efb
commit 7c6a9a7317
1 changed files with 1 additions and 1 deletions

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 {
log.Fatal(err)
}
s.proposeC <- string(buf.Bytes())
s.proposeC <- buf.String()
}
func (s *kvstore) readCommits(commitC <-chan *string, errorC <-chan error) {