I am new to gRPC. I am implementing grpc transcoding in which I am facing an error regarding (missing method ProtoReflect). This me because of "google.golang.org/protobuf/proto" and "github.com/golang/protobuf/proto".
The .pb.go file contains proto package
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: routing/routing.proto
package routing
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
"github.com/golang/protobuf/proto"
Whereas, .pb.gw.go contains "google.golang.org/protobuf/proto"
/*
Package routing is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package routing
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
Go version: 1.18
How can I resolve this?