Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Jan 11, 2022
1 parent 8f61aab commit c2909d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ To automatically add an index to a stream, add `WriterAddIndex()` option to your
Then the index will be added to the stream when `Close()` is called.

```
// Add Index to stream...
// Add Index to stream...
enc := s2.NewWriter(w, s2.WriterAddIndex())
io.Copy(enc, r)
enc.Close()
Expand All @@ -714,7 +714,7 @@ If you want to store the index separately, you can use `CloseIndex()` instead of
This will return the index. Note that `CloseIndex()` should only be called once, and you shouldn't call `Close()`.

```
// Get index for separate storage...
// Get index for separate storage...
enc := s2.NewWriter(w)
io.Copy(enc, r)
index, err := enc.CloseIndex()
Expand Down

0 comments on commit c2909d1

Please sign in to comment.