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

Update Delete Godoc to describe soft delete behaviour #5554

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

bruc3mackenzi3
Copy link
Contributor

@bruc3mackenzi3 bruc3mackenzi3 commented Jul 29, 2022

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

gorm's Delete() method performs either a soft or hard delete, depending on whether the passed data model includes a deletedAt field. This is detailed here in the docs and this PR adds this to the Godoc comment.

I've also cleaned up the grammar to make the language of the comment consistent.

User Case Description

As a new user to gorm I found myself referencing the external docs at gorm.io to learn the behaviour of this method. Adding key details to inline documentation improves the user experience.

If there is an appetite for contribution to documentation I would like to submit more PRs like this across the codebase.

@bruc3mackenzi3 bruc3mackenzi3 changed the title update Delete Godoc to describe soft delete behaviour Update Delete Godoc to describe soft delete behaviour Jul 29, 2022
@bruc3mackenzi3
Copy link
Contributor Author

@jinzhu is it possible to get a review on this PR? I'm interested in making further contributions to GORM's documentation. If there's a desire for these sorts of improvements I will follow this PR up with more like it. Cheers!

@jinzhu jinzhu merged commit a358835 into go-gorm:master Aug 11, 2022
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