From 0da4dbe2322eb3b6224df35ce3e9fc83f104762b Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Thu, 14 Apr 2016 19:09:36 -0700 Subject: all: remove unnecessary type conversions cmd and runtime were handled separately, and I'm intentionally skipped syscall. This is the rest of the standard library. CL generated mechanically with github.com/mdempsky/unconvert. Change-Id: I9e0eff886974dedc37adb93f602064b83e469122 Reviewed-on: https://go-review.googlesource.com/22104 Reviewed-by: Brad Fitzpatrick Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot --- src/encoding/gob/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/encoding/gob') diff --git a/src/encoding/gob/encode.go b/src/encoding/gob/encode.go index 2b3a556eac..50cd6adb46 100644 --- a/src/encoding/gob/encode.go +++ b/src/encoding/gob/encode.go @@ -127,7 +127,7 @@ func (state *encoderState) encodeInt(i int64) { } else { x = uint64(i << 1) } - state.encodeUint(uint64(x)) + state.encodeUint(x) } // encOp is the signature of an encoding operator for a given type. -- cgit v1.3 From 8082828ed0b07225c50a991dbe2a176346fba3b8 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 21 Apr 2016 12:43:22 -0700 Subject: encoding/gob: document compatibility Fixes #13808. Change-Id: Ifbd5644da995a812438a405485c9e08b4503a313 Reviewed-on: https://go-review.googlesource.com/22352 Reviewed-by: Ian Lance Taylor --- src/encoding/gob/doc.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/encoding/gob') diff --git a/src/encoding/gob/doc.go b/src/encoding/gob/doc.go index cf878f4502..6f86d84891 100644 --- a/src/encoding/gob/doc.go +++ b/src/encoding/gob/doc.go @@ -254,6 +254,12 @@ In summary, a gob stream looks like where * signifies zero or more repetitions and the type id of a value must be predefined or be defined before the value in the stream. +Compatibility: Any future changes to the package will endeavor to maintain +compatibility with streams encoded using previous versions. That is, any released +version of this package should be able to decode data written with any previously +released version, subject to issues such as security fixes. See the Go compatibility +document for background: https://golang.org/doc/go1compat + See "Gobs of data" for a design discussion of the gob wire format: https://blog.golang.org/gobs-of-data */ -- cgit v1.3