Minor updates

This commit is contained in:
Andrew Scott 2022-09-01 22:51:36 -04:00
parent 7e51085b1a
commit daff7e7cef
Signed by: a
GPG key ID: 3EB62D0BBB8DB381
3 changed files with 9 additions and 6 deletions

View file

@ -10,11 +10,11 @@ import (
func doFiveDay(c pb.WeatherServiceClient) { func doFiveDay(c pb.WeatherServiceClient) {
res, err := c.FiveDay(context.Background(), &pb.RequestFiveDay{ res, err := c.FiveDay(context.Background(), &pb.RequestFiveDay{
LocationType: pb.LocationType_LOCATION_TYPE_CITY, LocationType: pb.LocationType_LOCATION_TYPE_UNSPECIFIED,
Units: pb.Units_UNITS_METRIC, Units: pb.Units_UNITS_METRIC,
Location: &pb.OneOfLocation{ Location: &pb.OneOfLocation{
LocationId: &pb.OneOfLocation_City{ LocationId: &pb.OneOfLocation_ZipCode{
City: "", ZipCode: "97330",
}, },
}, },
}) })

View file

@ -12,7 +12,10 @@ func doLocation(c pb.WeatherServiceClient) {
res, err := c.Location(context.Background(), &pb.RequestLocation{ res, err := c.Location(context.Background(), &pb.RequestLocation{
LocationType: pb.LocationType_LOCATION_TYPE_CITY, LocationType: pb.LocationType_LOCATION_TYPE_CITY,
Location: &pb.OneOfLocation{ Location: &pb.OneOfLocation{
LocationId: &pb.OneOfLocation_City{City: "Corvallis"}}, LocationId: &pb.OneOfLocation_City{
City: "Corvallis",
},
},
}) })
if err != nil { if err != nil {

View file

@ -19,6 +19,6 @@ func main() {
c := pb.NewWeatherServiceClient(conn) c := pb.NewWeatherServiceClient(conn)
//doCurrent(c) //doCurrent(c)
doFiveDay(c) //doFiveDay(c)
//doLocation(c) doLocation(c)
} }