Skip to content

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

Merged

Conversation

kyuan-mongodb
Copy link
Contributor

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

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Does it render on staging correctly?
  • Are all the links working?
  • Are the staging links in the PR description updated?

Copy link
Contributor

@biniona-mongodb biniona-mongodb left a 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.

Copy link
Contributor

@biniona-mongodb biniona-mongodb left a 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.

Copy link
Contributor

@biniona-mongodb biniona-mongodb left a comment

Choose a reason for hiding this comment

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

Approved with suggestion

@kyuan-mongodb kyuan-mongodb requested a review from kevinAlbs July 26, 2021 18:05
@kyuan-mongodb
Copy link
Contributor Author

Hi @kevinAlbs, This PR is ready for review.

@matthewdale matthewdale self-requested a review July 27, 2021 17:47
@kevinAlbs kevinAlbs removed their request for review July 27, 2021 20:31
@kyuan-mongodb kyuan-mongodb changed the title DOCSP-13862-UsageExampleDeleteOne DOCSP-13862 delete one usage example Jul 28, 2021
API Documentation
~~~~~~~~~~~~~~~~~

:go-api:`DeleteOne() <mongo#Collection.DeleteOne>`
Copy link
Collaborator

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)
Copy link
Collaborator

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.

@kyuan-mongodb
Copy link
Contributor Author

Hi @matthewdale, I implemented the changes you mentioned above. Please let me know if there is anything else that needs to be fixed.

Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

👍

@kyuan-mongodb kyuan-mongodb merged commit a0d7d6c into mongodb:master Jul 29, 2021
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.

3 participants