2012-01-25 21:54:22 +00:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2021-07-30 14:28:58 -07:00
|
|
|
//go:build ignore
|
2012-03-02 16:38:43 +00:00
|
|
|
|
2011-12-07 01:11:29 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
// Need to compile package gob with debug.go to build this program.
|
2012-03-06 17:57:23 +00:00
|
|
|
// See comments in debug.go for how to do this.
|
2011-12-07 01:11:29 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/gob"
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
var err error
|
|
|
|
file := os.Stdin
|
|
|
|
if len(os.Args) > 1 {
|
|
|
|
file, err = os.Open(os.Args[1])
|
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintf(os.Stderr, "dump: %s\n", err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gob.Debug(file)
|
|
|
|
}
|