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

[hygiene] Use enum instead of a string #6067

Open
yurishkuro opened this issue Oct 7, 2024 · 0 comments · May be fixed by #6068
Open

[hygiene] Use enum instead of a string #6067

yurishkuro opened this issue Oct 7, 2024 · 0 comments · May be fixed by #6068
Labels
area/storage enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement storage/elasticsearch

Comments

@yurishkuro
Copy link
Member

in plugin/storage/es/mappings/mapping.go the function GetMapping accepts a string argument and does pattern matching on it, as well as uses it for loading template files internal to the package. It's a poor design, we should instead use a numeric enum (which has private string() function to map to the file name).

@yurishkuro yurishkuro added help wanted Features that maintainers are willing to accept but do not have cycles to implement good first issue Good for beginners labels Oct 7, 2024
@Saumya40-codes Saumya40-codes linked a pull request Oct 7, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage enhancement good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement storage/elasticsearch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant