You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use example code to regenerate data.pb.go, but not generate bson:"_id, omitempty" or other tag "bson:xxxxx" fields.
Code fragment:
package main
import (
fmt "fmt"
pmongo "github.com/amsokol/mongo-go-driver-protobuf/pmongo"
_ "github.com/amsokol/protoc-gen-gotag/tagger"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.var_=proto.Marshalvar_=fmt.Errorfvar_=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 packagetypeDatastruct {
Id*pmongo.ObjectId`protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`BoolValuebool`protobuf:"varint,2,opt,name=boolValue,proto3" json:"boolValue,omitempty"`BoolProtoValue*wrappers.BoolValue`protobuf:"bytes,3,opt,name=boolProtoValue,proto3" json:"boolProtoValue,omitempty"`BytesValue []byte`protobuf:"bytes,4,opt,name=bytesValue,proto3" json:"bytesValue,omitempty"`BytesProtoValue*wrappers.BytesValue`protobuf:"bytes,5,opt,name=bytesProtoValue,proto3" json:"bytesProtoValue,omitempty"`DoubleValuefloat64`protobuf:"fixed64,6,opt,name=doubleValue,proto3" json:"doubleValue,omitempty"`DoubleProtoValue*wrappers.DoubleValue`protobuf:"bytes,7,opt,name=doubleProtoValue,proto3" json:"doubleProtoValue,omitempty"`FloatValuefloat32`protobuf:"fixed32,8,opt,name=floatValue,proto3" json:"floatValue,omitempty"`FloatProtoValue*wrappers.FloatValue`protobuf:"bytes,9,opt,name=floatProtoValue,proto3" json:"floatProtoValue,omitempty"`Int32Valueint32`protobuf:"varint,10,opt,name=int32Value,proto3" json:"int32Value,omitempty"`Int32ProtoValue*wrappers.Int32Value`protobuf:"bytes,11,opt,name=int32ProtoValue,proto3" json:"int32ProtoValue,omitempty"`Int64Valueint64`protobuf:"varint,12,opt,name=int64Value,proto3" json:"int64Value,omitempty"`Int64ProtoValue*wrappers.Int64Value`protobuf:"bytes,13,opt,name=int64ProtoValue,proto3" json:"int64ProtoValue,omitempty"`StringValuestring`protobuf:"bytes,14,opt,name=stringValue,proto3" json:"stringValue,omitempty"`StringProtoValue*wrappers.StringValue`protobuf:"bytes,15,opt,name=stringProtoValue,proto3" json:"stringProtoValue,omitempty"`Uint32Valueuint32`protobuf:"varint,16,opt,name=uint32Value,proto3" json:"uint32Value,omitempty"`Uint32ProtoValue*wrappers.UInt32Value`protobuf:"bytes,17,opt,name=uint32ProtoValue,proto3" json:"uint32ProtoValue,omitempty"`Uint64Valueuint64`protobuf:"varint,18,opt,name=uint64Value,proto3" json:"uint64Value,omitempty"`Uint64ProtoValue*wrappers.UInt64Value`protobuf:"bytes,19,opt,name=uint64ProtoValue,proto3" json:"uint64ProtoValue,omitempty"`Timestamp*timestamp.Timestamp`protobuf:"bytes,20,opt,name=timestamp,proto3" json:"timestamp,omitempty"`XXX_NoUnkeyedLiteralstruct{} `json:"-"`XXX_unrecognized []byte`json:"-"`XXX_sizecacheint32`json:"-"`
}
The text was updated successfully, but these errors were encountered:
Use example code to regenerate data.pb.go, but not generate bson:"_id, omitempty" or other tag "bson:xxxxx" fields.
Code fragment:
The text was updated successfully, but these errors were encountered: