blob: 17238c98df0d3bdf04a1084c1edd129a656f8e84 [file] [log] [blame]
Colin Cross7bb052a2015-02-03 12:59:37 -08001// Copyright 2009 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
5// +build ignore
6
7package main
8
9// Need to compile package gob with debug.go to build this program.
10// See comments in debug.go for how to do this.
11
12import (
13 "encoding/gob"
14 "fmt"
15 "os"
16)
17
18func main() {
19 var err error
20 file := os.Stdin
21 if len(os.Args) > 1 {
22 file, err = os.Open(os.Args[1])
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "dump: %s\n", err)
25 os.Exit(1)
26 }
27 }
28 gob.Debug(file)
29}