Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(internal): Fix plural acronyms in SnakeCase function #16530

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

DStrand1
Copy link
Member

Summary

Fixes plural acronyms being split up into "separate words" for snake case. Example:

  • SnakeIDGoogle gets split into snake_id_google
  • ConsumedLCUs would get split into consumed_lc_us, since it assumes that Us is the "next word

Now will return consumed_lcus, having a special case for acronyms like LCUs (ending in 's')

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16496

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Feb 19, 2025
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @DStrand1!

@srebhan
Copy link
Member

srebhan commented Feb 20, 2025

@DStrand1 is this ready to be merged?

@srebhan srebhan self-assigned this Feb 20, 2025
@DStrand1 DStrand1 merged commit c4fe393 into influxdata:master Feb 24, 2025
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.33.3 milestone Feb 24, 2025
srebhan pushed a commit that referenced this pull request Feb 25, 2025
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Mar 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/agent fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

telegraf/internal/internal.go/SnakeCase misparses "ConsumedLCUs"
2 participants