-
Notifications
You must be signed in to change notification settings - Fork 33
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-32693: FindOne by ObjectId #297
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.
a few more things - lmk if you have questions about the struct comment
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.
lgtm with two small items! Great job, I know the code with going back and forth b/t bson and go is hard :)
:language: none | ||
:visible: false | ||
|
||
{"item":"Hibiscus","rating":4} |
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.
Q: this output shows the field names as lowercase, but if the code is unmarshalling the document to the Review
type, it should look different, as it should print with the fieldnames from the 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.
When I run the code, it outputs the lowercase field names so maybe it's not unmarshalling to a Review
? I might be missing something in the code
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 think the field names will stay lowercase after using the MarshalExtJSON() function, unless I unmarshal again into the struct. Looks like the printed documents on this page also have lowercase fields.
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 👍
* DOCSP-32693: FindOne by ObjectId * fixing code * adding callout + text * code spacing * reword * error message * most feedback + stage * adding label * fix highlight * move code to separate file * fix literalinclude * includes * io code blocks * feedback pt 2 * code typos * last suggestions * fix (cherry picked from commit b488097)
* DOCSP-32693: FindOne by ObjectId * fixing code * adding callout + text * code spacing * reword * error message * most feedback + stage * adding label * fix highlight * move code to separate file * fix literalinclude * includes * io code blocks * feedback pt 2 * code typos * last suggestions * fix (cherry picked from commit b488097) (cherry picked from commit 36da935)
* DOCSP-32693: FindOne by ObjectId * fixing code * adding callout + text * code spacing * reword * error message * most feedback + stage * adding label * fix highlight * move code to separate file * fix literalinclude * includes * io code blocks * feedback pt 2 * code typos * last suggestions * fix (cherry picked from commit b488097) (cherry picked from commit 36da935)
* DOCSP-32693: FindOne by ObjectId * fixing code * adding callout + text * code spacing * reword * error message * most feedback + stage * adding label * fix highlight * move code to separate file * fix literalinclude * includes * io code blocks * feedback pt 2 * code typos * last suggestions * fix (cherry picked from commit b488097) (cherry picked from commit 36da935)
* DOCSP-32693: FindOne by ObjectId * fixing code * adding callout + text * code spacing * reword * error message * most feedback + stage * adding label * fix highlight * move code to separate file * fix literalinclude * includes * io code blocks * feedback pt 2 * code typos * last suggestions * fix (cherry picked from commit b488097) (cherry picked from commit 36da935)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-32693
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/golang/docsworker-xlarge/DOCSP-32693-find-by-id/fundamentals/crud/read-operations/retrieve/
Self-Review Checklist