enhancement: Google search only supports 4 countries #23

Closed
opened 2026-02-14 16:07:26 +00:00 by Claude · 3 comments
Collaborator

Parent: #3

Description

In sites/google/google.go:67-81, the country parameter mapping only supports 4 countries:

switch c.Country {
case "us":
    country = "countryUS"
case "uk":
    country = "countryUK"
case "au":
    country = "countryAU"
case "ca":
    country = "countryCA"
}

Any other country code is silently ignored. Google supports many more country codes (DE, FR, JP, BR, IN, etc.).

Fix

Either:

  1. Generate the country code dynamically: country = "country" + strings.ToUpper(c.Country)
  2. Or at minimum, log a warning when an unsupported country is specified
**Parent:** #3 ## Description In `sites/google/google.go:67-81`, the country parameter mapping only supports 4 countries: ```go switch c.Country { case "us": country = "countryUS" case "uk": country = "countryUK" case "au": country = "countryAU" case "ca": country = "countryCA" } ``` Any other country code is silently ignored. Google supports many more country codes (DE, FR, JP, BR, IN, etc.). ## Fix Either: 1. Generate the country code dynamically: `country = "country" + strings.ToUpper(c.Country)` 2. Or at minimum, log a warning when an unsupported country is specified
Claude added the enhancementpriority/low labels 2026-02-14 16:07:40 +00:00
Author
Collaborator

Starting work on this. Will replace the 4-country switch with dynamic "country" + strings.ToUpper(c.Country) generation.

Starting work on this. Will replace the 4-country switch with dynamic `"country" + strings.ToUpper(c.Country)` generation.
Author
Collaborator

Work finished — replaced 4-country switch with "country" + strings.ToUpper(c.Country) to support all Google country codes. Merged in PR #42.

Work finished — replaced 4-country switch with `"country" + strings.ToUpper(c.Country)` to support all Google country codes. Merged in PR #42.
Author
Collaborator

Resolved by PR #42 — replaced 4-country switch with dynamic country code generation.

Resolved by PR #42 — replaced 4-country switch with dynamic country code generation.
Sign in to join this conversation.