Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-01-24 22:44:26 +03:00
parent 8a71466ba4
commit 88a4c1641d
48 changed files with 200 additions and 137 deletions

View File

@@ -7,11 +7,12 @@
package pb
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
const (
@@ -194,12 +195,15 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: reflect.CallReq
(*Nested)(nil), // 1: reflect.Nested
(*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: reflect.CallReq
(*Nested)(nil), // 1: reflect.Nested
(*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value
}
)
var file_test_proto_depIdxs = []int32{
1, // 0: reflect.CallReq.nested:type_name -> reflect.Nested
2, // 1: reflect.Nested.uint64_args:type_name -> google.protobuf.UInt64Value

View File

@@ -61,9 +61,8 @@ func TestMergeString(t *testing.T) {
mp["bool"] = true
s := &str{}
t.Logf("merge with true")
if err := rutil.Merge(s, mp, rutil.Tags([]string{"json"})); err != nil {
t.Fatal(err)
t.Fatalf("merge with true err: %v", err)
}
if s.Bool != "true" {
@@ -71,9 +70,8 @@ func TestMergeString(t *testing.T) {
}
mp["bool"] = false
t.Logf("merge with false")
if err := rutil.Merge(s, mp, rutil.Tags([]string{"json"})); err != nil {
t.Fatal(err)
t.Fatalf("merge with falst err: %v", err)
}
if s.Bool != "false" {