18 lines
286 B
Go
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)
|
|
}
|
|
}
|