go-study/err_group/weather_test.go
2023-12-28 17:41:52 +08:00

18 lines
286 B
Go

package err_group
import (
"testing"
"time"
)
func TestGetAllCityWeatherData(t *testing.T) {
list, err := GetAllCityWeatherData(500 * time.Millisecond)
if err != nil {
t.Fatal(err)
}
for _, data := range list {
t.Logf("%s: %s, %d", data.City, data.Weather, data.Temp)
}
}