LEFT | RIGHT |
(no file at all) | |
| 1 // compile |
| 2 |
1 // Copyright 2011 The Go Authors. All rights reserved. | 3 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
4 | 6 |
5 package gobs1 | 7 package gobs1 |
6 | 8 |
7 type T struct{ X, Y, Z int } // Only exported fields are encoded and decoded. | 9 type T struct{ X, Y, Z int } // Only exported fields are encoded and decoded. |
8 var t = T{X: 7, Y: 0, Z: 8} | 10 var t = T{X: 7, Y: 0, Z: 8} |
9 | 11 |
10 // STOP OMIT | 12 // STOP OMIT |
11 | 13 |
12 type U struct{ X, Y *int8 } // Note: pointers to int8s | 14 type U struct{ X, Y *int8 } // Note: pointers to int8s |
13 var u U | 15 var u U |
14 | 16 |
15 // STOP OMIT | 17 // STOP OMIT |
16 | 18 |
17 type Node struct { | 19 type Node struct { |
18 Value int | 20 Value int |
19 Left, Right *Node | 21 Left, Right *Node |
20 } | 22 } |
21 | 23 |
22 // STOP OMIT | 24 // STOP OMIT |
LEFT | RIGHT |