Просмотр исходного кода

Adding repeated field data population example

Signed-off-by: David Symonds <dsymonds@golang.org>
Zac Mullett 10 лет назад
Родитель
Сommit
6aaa8d4770
2 измененных файлов с 2 добавлено и 0 удалено
  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 {
 			Label: proto.String("hello"),
 			Type:  proto.Int32(17),
+			Reps:  []int64{1, 2, 3},
 			Optionalgroup: &example.Test_OptionalGroup {
 				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{
 			Label: proto.String("hello"),
 			Type:  proto.Int32(17),
+			Reps:  []int64{1, 2, 3},
 			Optionalgroup: &pb.Test_OptionalGroup{
 				RequiredField: proto.String("good bye"),
 			},