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

feat: add key exists #243

Merged
merged 5 commits into from
Mar 8, 2023
Merged

feat: add key exists #243

merged 5 commits into from
Mar 8, 2023

Conversation

pgautier404
Copy link
Contributor

No description provided.

Comment on lines 131 to 113
if key == nil || len(key.asBytes()) == 0 {
return nil, buildError(momentoerrors.InvalidArgumentError, "key cannot be nil or empty", nil)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if key == nil || len(key.asBytes()) == 0 {
return nil, buildError(momentoerrors.InvalidArgumentError, "key cannot be nil or empty", nil)
}
if err := validateNotEmpty(key, "key"); err != nil {
return nil, err
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks. Updated in 974695c.

@pgautier404 pgautier404 marked this pull request as ready for review March 8, 2023 20:25
@pgautier404 pgautier404 merged commit 7eb52fa into main Mar 8, 2023
@pgautier404 pgautier404 deleted the add-key-exists branch March 8, 2023 21:46
cprice404 pushed a commit that referenced this pull request Mar 14, 2023
* feat: adding keys exist

* add stub for test

* lint fixes

* correct test assertions

* use validator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants