There are my codes:
file1.go:
type ErrorCode Int32
var result ErrorCode
file2.pb.go:
type CollectionGC struct {
Result *ErrorCode `protobuf:"varint,1,opt,name=result,enum=api.ErrorCode" json:"result,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
messageGC := &CollectionGC {
Result: result, // a error occurs
}
That gives:
Invalid assignment from result(ErrorCode) to Result(*ErrorCode), and fun CollectionGC.SetResult(value int32) is nonexisted in file2.pb.go.
How to avoid this error?