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