Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return Errors instead of Panicing #30

Merged
merged 15 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

/.vscode
.idea
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ linters-settings:
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## Unreleased

### BREAKING CHANGES

- [\#30](https://github.com/tendermint/tm-db/pull/30) Interface Breaking, Interfaces return errors instead of panic:
- Changes to function signatures:
- DB interface:
- `Get([]byte) ([]byte, error)`
- `Has(key []byte) (bool, error)`
- `Set([]byte, []byte) error`
- `SetSync([]byte, []byte) error`
- `Delete([]byte) error`
- `DeleteSync([]byte) error`
- `Iterator(start, end []byte) (Iterator, error)`
- `ReverseIterator(start, end []byte) (Iterator, error)`
- `Close() error`
- `Print() error`
- Batch interface:
- `Write() error`
- `WriteSync() error`
- Iterator interface:
- `Next() error`
- `Key() (key []byte, err error)`
- `Value() (value []byte, err error)`


### IMPROVEMENTS

## 0.3

**2019-11-18**
Expand Down
9 changes: 0 additions & 9 deletions CHANGELOG_PENDING.md

This file was deleted.

Loading