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

*: Tiny clean up #731

Merged
merged 5 commits into from
Dec 17, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
kv: address comments
  • Loading branch information
zimulala committed Dec 16, 2015
commit 1642c70c646cae20cac265519a8430693206451b
2 changes: 1 addition & 1 deletion kv/index_iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (c *kvIndex) GenIndexKey(indexedValues []interface{}, h int64) (key []byte,
}

// Create creates a new entry in the kvIndex data.
// If the index is unique and it already existed an entry with the same key, Create will return ErrKeyExists.
// If the index is unique and there is an existing entry with the same key, Create will return ErrKeyExists.
func (c *kvIndex) Create(rm RetrieverMutator, indexedValues []interface{}, h int64) error {
key, distinct, err := c.GenIndexKey(indexedValues, h)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion kv/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func DecodeValue(data []byte) ([]interface{}, error) {
}

// NextUntil applies FnKeyCmp to each entry of the iterator until meets some condition.
// It will stop when fn returns true, or iterator is invalid or occur errors.
// It will stop when fn returns true, or iterator is invalid or an error occurs.
func NextUntil(it Iterator, fn FnKeyCmp) error {
var err error
for it.Valid() && !fn([]byte(it.Key())) {
Expand Down