gobs1.go 445 B

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