Commit a4d502c
committed
proto: Port example.go to proto3
Using jsonpb [1,2].
Drop the proto.String bits to avoid errors like:
./example.go:17: cannot use proto.String("linux") (type *string) as
type string in field value
And use a reference to s to avoid:
./example.go:29: cannot use s (type oci.LinuxSpec) as type
proto.Message in argument to marshaler.Marshal: oci.LinuxSpec
does not implement proto.Message (ProtoMessage method has pointer
receiver)
[1]: golang/protobuf#44
[2]: http://godoc.org/github.com/golang/protobuf/jsonpb
Signed-off-by: W. Trevor King <[email protected]>1 parent 8bead0f commit a4d502c
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
29 | 33 | | |
0 commit comments