]> Cypherpunks repositories - gostls13.git/commitdiff
gob: clarify the comments about installing the debug/dumper.
authorRob Pike <r@golang.org>
Fri, 29 Oct 2010 22:52:25 +0000 (15:52 -0700)
committerRob Pike <r@golang.org>
Fri, 29 Oct 2010 22:52:25 +0000 (15:52 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/2789043

src/pkg/gob/debug.go
src/pkg/gob/decoder.go

index 72645bdf0752e044c1cc2d468d513a8705169b0b..cbd662d1c9bfb662c92b20e04adb3aca41d29393 100644 (file)
@@ -1,6 +1,7 @@
 package gob
 
 // This file is not normally included in the gob package.  Used only for debugging the package itself.
+// Add debug.go to the files listed in the Makefile to add Debug to the gob package.
 
 import (
        "bytes"
@@ -14,7 +15,7 @@ import (
 var dump = false // If true, print the remaining bytes in the input buffer at each item.
 
 // Init installs the debugging facility. If this file is not compiled in the
-// package, Debug will be a no-op.
+// package, the test in codec_test.go is a no-op.
 func init() {
        debugFunc = Debug
 }
index 4237d01aca39bda8ec7aeb558224c859a535ab03..c28185f16cb32741f8ce9b294106e5304d88c6fc 100644 (file)
@@ -153,6 +153,7 @@ func (dec *Decoder) DecodeValue(value reflect.Value) os.Error {
        return dec.err
 }
 
-// If enabled, Debug prints a human-readable representation of the gob data read from r.
-// If debug.go is compiled into the program it will override this link.
+// If debug.go is compiled into the program , debugFunc prints a human-readable
+// representation of the gob data read from r by calling that file's Debug function.
+// Otherwise it is nil.
 var debugFunc func(io.Reader)