mirror of
https://codeberg.org/andyscott/OpenWeather-gRPC-API.git
synced 2024-11-14 06:50:48 -05:00
24 lines
427 B
Go
24 lines
427 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
pb "codeberg.org/andcscott/OpenWeather-gRPC-API/proto"
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
)
|
|
|
|
func main() {
|
|
|
|
conn, err := grpc.Dial("localhost:5000", grpc.WithTransportCredentials(insecure.NewCredentials()))
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
defer conn.Close()
|
|
|
|
c := pb.NewWeatherServiceClient(conn)
|
|
|
|
doCurrent(c)
|
|
//doFiveDay(c)
|
|
//doLocation(c)
|
|
}
|