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

Enforcing attribute naming by type #59

Open
mfridman opened this issue Oct 7, 2024 · 1 comment
Open

Enforcing attribute naming by type #59

mfridman opened this issue Oct 7, 2024 · 1 comment

Comments

@mfridman
Copy link

mfridman commented Oct 7, 2024

What do you think about adding the ability to enforce naming for certain types?

One that comes to mind is enforcing error naming. E.g., if the attribute is an error then it must be named "error" or some user-configurable list like:

error-type-names: ["error", "secondary_error"]
@mattdowdell
Copy link
Collaborator

In slog, kinds (value types) do not treat errors as a first class citizen. Instead, you have to convert them to strings first. Did you have a potential implementation in mind for this feature?

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

No branches or pull requests

2 participants