Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakjois authored Oct 16, 2017
1 parent efeee08 commit 99a40d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
log.Fatal(err)
}
defer db.Close()
 // Your code here
}
```

Expand All @@ -93,8 +93,8 @@ To start a read-only transaction, you can use the `DB.View()` method:

```go
err := db.View(func(tx *badger.Txn) error {
...
return nil
 // Your code here…
 return nil
})
```

Expand All @@ -108,8 +108,8 @@ To start a read-write transaction, you can use the `DB.Update()` method:

```go
err := db.Update(func(tx *badger.Txn) error {
...
return nil
 // Your code here…
 return nil
})
```

Expand All @@ -136,7 +136,7 @@ txn, err := db.NewTransaction(true)
if err != nil {
return err
}
defer tx.Discard()
defer txn.Discard()

// Use the transaction...
err := txn.Set([]byte("answer"), []byte("42"), 0)
Expand Down

0 comments on commit 99a40d6

Please sign in to comment.