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

Consider making constants for currencies #4134

Open
scr-oath opened this issue Jan 7, 2025 · 1 comment
Open

Consider making constants for currencies #4134

scr-oath opened this issue Jan 7, 2025 · 1 comment

Comments

@scr-oath
Copy link
Contributor

scr-oath commented Jan 7, 2025

I see "USD" in many places… there may be others… we should consider what the strategy is for enum-like constants and use it for this.

I personally like https://github.com/abice/go-enum as a generated enum, which has json/yaml marshaling and the ability to add your own template additions from the structured awareness of the enum metadata.

@bretg
Copy link
Contributor

bretg commented Jan 10, 2025

Interesting idea @scr-oath . We discussed in committee but we're thinking that since USD is the only currency mentioned in the codebase it doesn't make sense to add an enum for any more. And there's concern about the switching back and forth of enums to strings for currencies.

Any followup thoughts?

@bretg bretg moved this from Triage to Clarify Request in Prebid Server Prioritization Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Clarify Request
Development

No branches or pull requests

2 participants