mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-11-05 05:20:48 -05:00
21 lines
320 B
Go
21 lines
320 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"log"
|
||
|
|
||
|
pb "codeberg.org/andcscott/OpenWeatherMap-gRPC-API/proto"
|
||
|
)
|
||
|
|
||
|
func doExtended(c pb.WeatherServiceClient) {
|
||
|
|
||
|
res, err := c.Extended(context.Background(), &pb.RequestExtended{
|
||
|
City: "Corvallis",
|
||
|
Days: 7,
|
||
|
})
|
||
|
if err != nil {
|
||
|
log.Fatalln(err)
|
||
|
}
|
||
|
log.Println(res.Payload)
|
||
|
}
|