Ver Fonte

Adding repeated field data population example

Signed-off-by: David Symonds <dsymonds@golang.org>
Zac Mullett há 10 anos atrás
pai
commit
6aaa8d4770
2 ficheiros alterados com 2 adições e 0 exclusões
  1. 1 0
      README.md
  2. 1 0
      proto/lib.go

+ 1 - 0
README.md

@@ -140,6 +140,7 @@ To create and play with a Test object from the example package,
 		test := &example.Test {
 		test := &example.Test {
 			Label: proto.String("hello"),
 			Label: proto.String("hello"),
 			Type:  proto.Int32(17),
 			Type:  proto.Int32(17),
+			Reps:  []int64{1, 2, 3},
 			Optionalgroup: &example.Test_OptionalGroup {
 			Optionalgroup: &example.Test_OptionalGroup {
 				RequiredField: proto.String("good bye"),
 				RequiredField: proto.String("good bye"),
 			},
 			},

+ 1 - 0
proto/lib.go

@@ -235,6 +235,7 @@ To create and play with a Test object:
 		test := &pb.Test{
 		test := &pb.Test{
 			Label: proto.String("hello"),
 			Label: proto.String("hello"),
 			Type:  proto.Int32(17),
 			Type:  proto.Int32(17),
+			Reps:  []int64{1, 2, 3},
 			Optionalgroup: &pb.Test_OptionalGroup{
 			Optionalgroup: &pb.Test_OptionalGroup{
 				RequiredField: proto.String("good bye"),
 				RequiredField: proto.String("good bye"),
 			},
 			},