diff --git a/cybozu/validate/options.pb.go b/cybozu/validate/options.pb.go index 7552d0c..5bba355 100644 --- a/cybozu/validate/options.pb.go +++ b/cybozu/validate/options.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: cybozu/validate/options.proto @@ -145,11 +145,9 @@ type FieldRules struct { func (x *FieldRules) Reset() { *x = FieldRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldRules) String() string { @@ -160,7 +158,7 @@ func (*FieldRules) ProtoMessage() {} func (x *FieldRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -478,11 +476,9 @@ type ItemsRules struct { func (x *ItemsRules) Reset() { *x = ItemsRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ItemsRules) String() string { @@ -493,7 +489,7 @@ func (*ItemsRules) ProtoMessage() {} func (x *ItemsRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -540,11 +536,9 @@ type FloatRules struct { func (x *FloatRules) Reset() { *x = FloatRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FloatRules) String() string { @@ -555,7 +549,7 @@ func (*FloatRules) ProtoMessage() {} func (x *FloatRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,11 +610,9 @@ type DoubleRules struct { func (x *DoubleRules) Reset() { *x = DoubleRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DoubleRules) String() string { @@ -631,7 +623,7 @@ func (*DoubleRules) ProtoMessage() {} func (x *DoubleRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -692,11 +684,9 @@ type Int32Rules struct { func (x *Int32Rules) Reset() { *x = Int32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Int32Rules) String() string { @@ -707,7 +697,7 @@ func (*Int32Rules) ProtoMessage() {} func (x *Int32Rules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,11 +758,9 @@ type Int64Rules struct { func (x *Int64Rules) Reset() { *x = Int64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Int64Rules) String() string { @@ -783,7 +771,7 @@ func (*Int64Rules) ProtoMessage() {} func (x *Int64Rules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +832,9 @@ type Uint32Rules struct { func (x *Uint32Rules) Reset() { *x = Uint32Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Uint32Rules) String() string { @@ -859,7 +845,7 @@ func (*Uint32Rules) ProtoMessage() {} func (x *Uint32Rules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -920,11 +906,9 @@ type Uint64Rules struct { func (x *Uint64Rules) Reset() { *x = Uint64Rules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Uint64Rules) String() string { @@ -935,7 +919,7 @@ func (*Uint64Rules) ProtoMessage() {} func (x *Uint64Rules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -988,11 +972,9 @@ type BoolRules struct { func (x *BoolRules) Reset() { *x = BoolRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BoolRules) String() string { @@ -1003,7 +985,7 @@ func (*BoolRules) ProtoMessage() {} func (x *BoolRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1051,11 +1033,9 @@ type StringRules struct { func (x *StringRules) Reset() { *x = StringRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringRules) String() string { @@ -1066,7 +1046,7 @@ func (*StringRules) ProtoMessage() {} func (x *StringRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1188,11 +1168,9 @@ type BytesRules struct { func (x *BytesRules) Reset() { *x = BytesRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BytesRules) String() string { @@ -1203,7 +1181,7 @@ func (*BytesRules) ProtoMessage() {} func (x *BytesRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1247,11 +1225,9 @@ type EnumRules struct { func (x *EnumRules) Reset() { *x = EnumRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumRules) String() string { @@ -1262,7 +1238,7 @@ func (*EnumRules) ProtoMessage() {} func (x *EnumRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1304,11 +1280,9 @@ type MessageRules struct { func (x *MessageRules) Reset() { *x = MessageRules{} - if protoimpl.UnsafeEnabled { - mi := &file_cybozu_validate_options_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cybozu_validate_options_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageRules) String() string { @@ -1319,7 +1293,7 @@ func (*MessageRules) ProtoMessage() {} func (x *MessageRules) ProtoReflect() protoreflect.Message { mi := &file_cybozu_validate_options_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1662,164 +1636,6 @@ func file_cybozu_validate_options_proto_init() { if File_cybozu_validate_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_cybozu_validate_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FieldRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ItemsRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*FloatRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DoubleRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Int32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Int64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Uint32Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Uint64Rules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*BoolRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StringRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BytesRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*EnumRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cybozu_validate_options_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*MessageRules); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_cybozu_validate_options_proto_msgTypes[0].OneofWrappers = []any{ (*FieldRules_Float)(nil), (*FieldRules_Double)(nil), diff --git a/examples/validation.pb.go b/examples/validation.pb.go index 018f903..2edea98 100644 --- a/examples/validation.pb.go +++ b/examples/validation.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: examples/validation.proto @@ -83,11 +83,9 @@ type Ignored struct { func (x *Ignored) Reset() { *x = Ignored{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Ignored) String() string { @@ -98,7 +96,7 @@ func (*Ignored) ProtoMessage() {} func (x *Ignored) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,11 +150,9 @@ type Scalars struct { func (x *Scalars) Reset() { *x = Scalars{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Scalars) String() string { @@ -167,7 +163,7 @@ func (*Scalars) ProtoMessage() {} func (x *Scalars) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,11 +308,9 @@ type OptionalScalars struct { func (x *OptionalScalars) Reset() { *x = OptionalScalars{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OptionalScalars) String() string { @@ -327,7 +321,7 @@ func (*OptionalScalars) ProtoMessage() {} func (x *OptionalScalars) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +456,9 @@ type RepeatedScalars struct { func (x *RepeatedScalars) Reset() { *x = RepeatedScalars{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RepeatedScalars) String() string { @@ -477,7 +469,7 @@ func (*RepeatedScalars) ProtoMessage() {} func (x *RepeatedScalars) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,11 +539,9 @@ type Strings struct { func (x *Strings) Reset() { *x = Strings{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Strings) String() string { @@ -562,7 +552,7 @@ func (*Strings) ProtoMessage() {} func (x *Strings) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -668,11 +658,9 @@ type Maps struct { func (x *Maps) Reset() { *x = Maps{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Maps) String() string { @@ -683,7 +671,7 @@ func (*Maps) ProtoMessage() {} func (x *Maps) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -743,11 +731,9 @@ type Enums struct { func (x *Enums) Reset() { *x = Enums{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Enums) String() string { @@ -758,7 +744,7 @@ func (*Enums) ProtoMessage() {} func (x *Enums) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -820,11 +806,9 @@ type Oneofs struct { func (x *Oneofs) Reset() { *x = Oneofs{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Oneofs) String() string { @@ -835,7 +819,7 @@ func (*Oneofs) ProtoMessage() {} func (x *Oneofs) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,11 +924,9 @@ type Composed struct { func (x *Composed) Reset() { *x = Composed{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Composed) String() string { @@ -955,7 +937,7 @@ func (*Composed) ProtoMessage() {} func (x *Composed) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1008,11 +990,9 @@ type Nested struct { func (x *Nested) Reset() { *x = Nested{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Nested) String() string { @@ -1023,7 +1003,7 @@ func (*Nested) ProtoMessage() {} func (x *Nested) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1056,11 +1036,9 @@ type Nested_Inner struct { func (x *Nested_Inner) Reset() { *x = Nested_Inner{} - if protoimpl.UnsafeEnabled { - mi := &file_examples_validation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_examples_validation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Nested_Inner) String() string { @@ -1071,7 +1049,7 @@ func (*Nested_Inner) ProtoMessage() {} func (x *Nested_Inner) ProtoReflect() protoreflect.Message { mi := &file_examples_validation_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1358,140 +1336,6 @@ func file_examples_validation_proto_init() { if File_examples_validation_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_examples_validation_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Ignored); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Scalars); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*OptionalScalars); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*RepeatedScalars); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Strings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Maps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Enums); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Oneofs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Composed); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Nested); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_examples_validation_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Nested_Inner); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_examples_validation_proto_msgTypes[2].OneofWrappers = []any{} file_examples_validation_proto_msgTypes[6].OneofWrappers = []any{} file_examples_validation_proto_msgTypes[7].OneofWrappers = []any{ diff --git a/go.mod b/go.mod index cdffc21..a650d7f 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,11 @@ module github.com/cybozu/protobuf -go 1.22 - -toolchain go1.22.1 +go 1.23.3 require ( - github.com/stretchr/testify v1.9.0 - golang.org/x/text v0.18.0 - google.golang.org/protobuf v1.34.2 + github.com/stretchr/testify v1.10.0 + golang.org/x/text v0.20.0 + google.golang.org/protobuf v1.35.2 ) require ( diff --git a/go.sum b/go.sum index 10cdb2f..714e2d7 100644 --- a/go.sum +++ b/go.sum @@ -4,14 +4,14 @@ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=