-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-13862 delete one usage example #6
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
DOCSP-13862 delete one usage example #6
Conversation
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.
Looks good. A few things to discuss, and then should be good to go.
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.
Looks great. Super super close to done. After this should be good to go through.
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.
Approved with suggestion
Hi @kevinAlbs, This PR is ready for review. |
source/usage-examples/deleteOne.txt
Outdated
API Documentation | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
:go-api:`DeleteOne() <mongo#Collection.DeleteOne>` |
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.
Similar comment as on #5:
This link in on the staging server goes to pkg.go.dev documentation for the github.com/mongodb/mongo-go-driver
package, but the canonical package is go.mongodb.org/mongo-driver
. They're technically the same, but it could be confusing if the reader doesn't realize that.
Please update to link to the docs at https://pkg.go.dev/go.mongodb.org/mongo-driver instead.
} | ||
|
||
// When you run this file for the first time, it should print "Documents deleted: 1" | ||
fmt.Printf("Documents deleted: %d\n", result) |
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.
To access the count, use result.DeletedCount
.
Hi @matthewdale, I implemented the changes you mentioned above. Please let me know if there is anything else that needs to be fixed. |
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.
👍
Pull Request Info
Page: Usage Examples > Delete Operations > Delete a Document
Issue JIRA link:
https://jira.mongodb.org/browse/DOCSP-13862
Docs staging link (requires sign-in on MongoDB Corp SSO):
https://docs-mongodbcom-staging.corp.mongodb.com/golang/docsworker-xlarge/DOCSP-13862-UsageExampleDeleteOne/usage-examples/deleteOne/
Self-Review Checklist