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

Make naming consistent throughout the codebase #39

Closed
oleiade opened this issue Mar 31, 2023 · 3 comments · Fixed by #46
Closed

Make naming consistent throughout the codebase #39

oleiade opened this issue Mar 31, 2023 · 3 comments · Fixed by #46
Assignees
Labels
enhancement New feature or request

Comments

@oleiade
Copy link
Member

oleiade commented Mar 31, 2023

Although Go advocates for a naming convention which keeps acronyms uppercased, the WebCrypto API doesn't follow such convention. It leads to certain types/constructs having names such as AesKeyGenParams when in proper Go code, it would be expected to be AESKeyGenParams.

So far we have followed the specs convention for structs, and Go's in other places such as for constants.

We should pick one, stick to it, and document it to make maintainers' lives easier 👍🏻

@codebien
Copy link

codebien commented Apr 4, 2023

We should pick one, stick to it, and document it to make maintainers' lives easier 👍🏻

I think WebCrypto does not follow it because it is a JavaScript API that follows its practices. Based on the fact that we're writing in Go and this code is internal code so it doesn't create any issue for the final UX, I would prefer to pick the Go practice.

@oleiade
Copy link
Member Author

oleiade commented Apr 4, 2023

Thanks for your input 🙇🏻

I prefer to follow the Go conventions too. However, my goal is ultimately that from a user perspective, the naming of exposed Objects, classes, and so is aligned with the WebCrypto specification. I'm unclear whether or not how things are named in Go impacts what is exposed to the user. I need to do a bit of research and experimentation 👀 🧪

@codebien
Copy link

codebien commented Apr 4, 2023

the naming of exposed Objects, classes, and so is aligned with the WebCrypto specification

I agree 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants