소스 검색

raft/doc: fix misuse of `for' loop in docs

Cong Ding 11 년 전
부모
커밋
362df8e470
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      raft/doc.go

+ 1 - 1
raft/doc.go

@@ -86,7 +86,7 @@ The total state machine handling loop will look something like this:
       if !raft.IsEmptySnap(rd.Snapshot) {
         processSnapshot(rd.Snapshot)
       }
-      for entry := range rd.CommittedEntries {
+      for _, entry := range rd.CommittedEntries {
         process(entry)
         if entry.Type == raftpb.EntryConfChange {
           var cc raftpb.ConfChange