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

Improve comment #706

Merged
merged 2 commits into from Oct 28, 2022
Merged

Improve comment #706

merged 2 commits into from Oct 28, 2022

Conversation

0x2b3bfa0
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 commented Oct 28, 2022

Thanks for bringing a bit of elegance to code comments, @casperdcl! #704 (comment)

@0x2b3bfa0 0x2b3bfa0 added documentation Markdown files p2-nice-to-have Low priority labels Oct 28, 2022
@0x2b3bfa0 0x2b3bfa0 self-assigned this Oct 28, 2022
@@ -349,7 +349,7 @@ func JitsuEventPayload(action string, e error, extra map[string]interface{}) (ma
}

if e != nil {
// Get the type of the error as a string, but not the error message itself, because it can be sensitive.
// Only use error type (not message) to avoid potentially sensitive information.
Copy link
Contributor

Choose a reason for hiding this comment

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

lol

Suggested change
// Only use error type (not message) to avoid potentially sensitive information.
// Only use error type (not message) to avoid potentially sensitive information

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Oct 29, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor

@casperdcl casperdcl Oct 29, 2022

Choose a reason for hiding this comment

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

Feel free to revert 🙈.
I'm not siding with you, and I don't like it, but I am happily caving in to the concept of an official spec.
Do you like my full sentences?

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Oct 29, 2022

Choose a reason for hiding this comment

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

Feel free to revert

Thanks! It's not worth the hassle to my mind, but appreciate it anyway. 🙏🏼

I'm not siding with you, and I don't like it, but I am happily caving in to the concept of an official spec. Do you like my full sentences?

This “rule” is quite flexible and not everybody follows it, less yet for inline code comments; it's mostly meant to document declarations. It's just one of those acquired tastes that some Gophers develop over time. 🦦

See e.g. the Go source code for examples.

@casperdcl casperdcl enabled auto-merge (squash) October 28, 2022 23:55
@casperdcl casperdcl merged commit c57ad9e into master Oct 28, 2022
@casperdcl casperdcl deleted the 0x2b3bfa0-patch-2 branch October 28, 2022 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Markdown files p2-nice-to-have Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants