-
Notifications
You must be signed in to change notification settings - Fork 907
GODRIVER-2704 Replace input validation error constants with "InvalidArgumentError". #1989
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,11 +29,10 @@ import ( | |
var ErrInvalidIndexValue = errors.New("invalid index value") | ||
|
||
// ErrNonStringIndexName is returned if an index is created with a name that is not a string. | ||
// | ||
// Deprecated: it will be removed in the next major release | ||
var ErrNonStringIndexName = errors.New("index name must be a string") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This error value appears to be unused. Can we mark it as deprecated, or should it be returned in some case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems not being used in the current v1 code base either. Is removing it considered a breaking change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, removing it is technically breaking because someone's code might reference the symbol, which would cause a compilation error if we remove it. The best we can do is mark it deprecated and note that it's no longer used. |
||
|
||
// ErrMultipleIndexDrop is returned if multiple indexes would be dropped from a call to IndexView.DropOne. | ||
var ErrMultipleIndexDrop = errors.New("multiple indexes would be dropped") | ||
|
||
// IndexView is a type that can be used to create, drop, and list indexes on a collection. An IndexView for a collection | ||
// can be created by a call to Collection.Indexes(). | ||
type IndexView struct { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend not exporting
Wrapped
to allow us to change how it's implemented in the future without breaking changes.