Skip to content

Conversation

bsardo
Copy link
Collaborator

@bsardo bsardo commented Sep 3, 2025

Implements #4379.

Does not include the validation logic proposed in #4379 (comment) that is currently under review.

@@ -33,6 +33,7 @@ type BidderInfo struct {
ModifyingVastXmlAllowed bool `yaml:"modifyingVastXmlAllowed" mapstructure:"modifyingVastXmlAllowed"`
Debug *DebugInfo `yaml:"debug" mapstructure:"debug"`
GVLVendorID uint16 `yaml:"gvlVendorID" mapstructure:"gvlVendorID"`
Geoscope []string `yaml:"geoscope" mapstructure:"geoscope"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: Please add alphabetically.

exclusion := ""
if strings.HasPrefix(code, "!") {
exclusion = "!"
code = strings.TrimPrefix(code, "!")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: To remove the first character, seems more natural to use code = code[1:].

errMsg string
}{
{
name: "nil-geoscope",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: The word "geoscope" is redundant. Consider calling this "nil" and the other "empty".

},
{
name: "valid-iso-codes",
geoscope: []string{"USA", "CAN", "GBR"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 3 codes instead of 1?

},
{
name: "invalid-length",
geoscope: []string{"USAA", "CAN"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why include CAN here too?

},
{
name: "invalid-exclusion-length",
geoscope: []string{"USA", "!CANN"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why include USA here?

},
{
name: "non-letter-characters",
geoscope: []string{"US1", "CAN"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why include CAN here? You get the idea.. :)

"FIN", "FRA", "GBR", "GRC", "HRV", "HUN", "IRL", "ISL", "ITA", "LIE",
"LTU", "LUX", "LVA", "MLT", "NLD", "NOR", "POL", "PRT", "ROU",
"SWE", "SVN", "SVK",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we have a config for the EEA definition? EEACountries?

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

Successfully merging this pull request may close these issues.

4 participants