瀏覽代碼

raft: fix godoc about starting a node

funkygao 11 年之前
父節點
當前提交
0b912c0faf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      raft/doc.go

+ 1 - 1
raft/doc.go

@@ -20,7 +20,7 @@ Usage
 The primary object in raft is a Node. You either start a Node from scratch
 using raft.StartNode or start a Node from some initial state using raft.RestartNode.
 	storage := raft.NewMemoryStorage()
-	n := raft.StartNode(0x01, []int64{0x02, 0x03}, 3, 1, storage)
+	n := raft.StartNode(0x01, []raft.Peer{{ID: 0x02}, {ID: 0x03}}, 3, 1, storage)
 
 Now that you are holding onto a Node you have a few responsibilities: