func fetch(ctx context.Context, req *http.Request, ch chan CovidStatus) error {
	defer close(ch)
	var s CovidStatus
	body, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Printf("fetch: %v", err)
		return err
	}
	defer body.Body.Close()
	err = json.NewDecoder(body.Body).Decode(&s)
	if err != nil {
		log.Printf("fetch: %v", err)
		return err
	}
	select {
	case ch <- CovidStatus{s.Cases, s.Deaths, s.Recovered}:
	case <-ctx.Done():
	}
	return nil
}
fetch runs on its own goroutine
package main
import (
	"context"
	"encoding/json"
	"flag"
	"fmt"
	"log"
	"net/http"
	"os"
	"time"
	"github.com/gen2brain/beeep"
)
const (
	myIP        = "http://ip-api.com/json"
	IMG         = "https://static.poder360.com.br/2020/03/23312-868x644.png"
	URL         = "https://corona.lmao.ninja/countries/"
	StateBrazil = "https://covid19-brazil-api.now.sh/api/report/v1/brazil/uf/"
	TIMEOUT     = time.Second * 2
)
type geoIP struct {
	CountryCode string `json:"countryCode"`
	Region      string `json:"region"`
}
type CovidStatus struct {
	Cases     int `json:"cases"`
	Deaths    int `json:"deaths"`
	Recovered int `json:"recovered"`
}
func (s CovidStatus) String() string {
	message := "Cases: %d, Deaths: %d, Recovered: %d"
	return fmt.Sprintf(message, s.Cases, s.Deaths, s.Recovered)
}