Advertisement
Guest User

Sonia

a guest
Dec 27th, 2009
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "gob"
  5. "os"
  6. )
  7.  
  8. type tsa struct {
  9. e1 [3]int;
  10. }
  11.  
  12. func main() {
  13. var sv tsa
  14. sv.e1[1] = 42
  15. fg, _ := os.Open("crash.gob", os.O_CREAT | os.O_TRUNC | os.O_RDWR, 0666)
  16. _ = gob.NewEncoder(fg).Encode(&sv)
  17. fg.Close()
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement