Fix invalid user agent error
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Elara 2023-06-28 21:53:00 -07:00
parent 669788034f
commit 254b675f2c

View File

@ -259,7 +259,7 @@ func getWeather(ctx context.Context, lat, lon float64) (*METResponse, error) {
}
// Set identifying user agent as per NMI requirements
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", version))
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", strings.TrimSpace(version)))
// Perform request
res, err := http.DefaultClient.Do(req)