Преглед изворни кода

Merge pull request #1552 from philips/fixup-wal-doc

wal: update the docs to show the optional metadata field
Brandon Philips пре 11 година
родитељ
комит
a535161a84
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      wal/doc.go

+ 2 - 1
wal/doc.go

@@ -22,7 +22,8 @@ A WAL is created at a particular directory and is made up of a number of
 discrete WAL files. Inside of each file the raft state and entries are appended
 discrete WAL files. Inside of each file the raft state and entries are appended
 to it with the Save method:
 to it with the Save method:
 
 
-	w, err := wal.Create("/var/lib/etcd")
+	metadata := []byte{}
+	w, err := wal.Create("/var/lib/etcd", metadata)
 	...
 	...
 	err := w.Save(s, ents)
 	err := w.Save(s, ents)