NewNetworkServerClient error

Hi Brocaar,when i use next code

func GPRCGetFrame(EUI string,limit int,offset int){
	
	var nsOpts=[]grpc.DialOption{
		grpc.WithInsecure(),
	}
	conn,err:=grpc.Dial(Address,nsOpts...)
	if err!=nil{
		log.Fatal("connecting error:",err)
	}
	client:=ns.NewNetworkServerClient(conn)
	var devEUI lorawan.EUI64
	err=devEUI.UnmarshalText([]byte(EUI))
	if err!=nil{
		log.Println(err)
	}
	req:=&ns.GetFrameLogsForDevEUIRequest{
		DevEUI:devEUI[:],
		Limit:int32(limit),
		Offset:int32(offset),
	}
	ctx:=context.Background()
	res,err:=client.GetFrameLogsForDevEUI(ctx,req)
	fmt.Println(res)
}

it’s run error:

# github.com/maxiiot/humiture/handler
../handler/frameHandler.go:126:35: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/brocaar/loraserver/vendor/google.golang.org/grpc".ClientConn in argument to ns.NewNetworkServerClient

I think the hint is already in the error :wink: The import path of the expected object vs the actual object does not match. I’m using govendor which will flatten vendors. See also: https://github.com/kardianos/govendor

so how this can be solved?

cd GOPATH/github.com/brocaar/loraserver
govendor remove google.golang.org/grpc