use insecure explicitly

This commit is contained in:
jasinco 2025-06-08 23:02:24 +08:00
parent 0bfc8779de
commit b98d050c7b

View file

@ -8,6 +8,7 @@ import (
"strconv" "strconv"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"nim.jasinco.work/app/igapi" "nim.jasinco.work/app/igapi"
) )
@ -77,7 +78,7 @@ func ReadFromENV() error {
} }
func IGAPI_establish() (*grpc.ClientConn, igapi.IGAPIClient) { func IGAPI_establish() (*grpc.ClientConn, igapi.IGAPIClient) {
conn, err := grpc.NewClient(IGAPI_HOST) conn, err := grpc.NewClient(IGAPI_HOST, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil { if err != nil {
log.Panicf("Can't connect to igapi: %s", err.Error()) log.Panicf("Can't connect to igapi: %s", err.Error())
} }