Skip to content

Commit

Permalink
compare method generator added
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed May 3, 2016
1 parent c3995ae commit 8b3113f
Show file tree
Hide file tree
Showing 86 changed files with 48,253 additions and 1,639 deletions.
153 changes: 86 additions & 67 deletions gogoproto/gogo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gogoproto/gogo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ extend google.protobuf.FileOptions {
optional bool goproto_unrecognized_all = 63026;
optional bool gogoproto_import = 63027;
optional bool protosizer_all = 63028;
optional bool compare_all = 63029;
}

extend google.protobuf.MessageOptions {
Expand Down Expand Up @@ -103,6 +104,7 @@ extend google.protobuf.MessageOptions {
optional bool goproto_unrecognized = 64026;

optional bool protosizer = 64028;
optional bool compare = 64029;
}

extend google.protobuf.FieldOptions {
Expand Down
4 changes: 4 additions & 0 deletions gogoproto/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,7 @@ func IsProto3(file *google_protobuf.FileDescriptorProto) bool {
func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool {
return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true)
}

func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool {
return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false))
}
Loading

0 comments on commit 8b3113f

Please sign in to comment.