]> Cypherpunks.ru repositories - gostls13.git/commitdiff
encoding/binary: add String and GoString method to nativeEndian
authorcuiweixie <cuiweixie@gmail.com>
Sun, 29 Jan 2023 08:42:17 +0000 (16:42 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 30 Jan 2023 18:51:09 +0000 (18:51 +0000)
Updates #57237

Change-Id: Ib626610130cae9c1d1aff5dd2a5035ffde0e127f
Reviewed-on: https://go-review.googlesource.com/c/go/+/463985
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: xie cui <523516579@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/encoding/binary/binary.go

index 0681511fbb9eb012fc17fe3d38e76394480aceb0..cb2ad1a7f890d084b962022b469d331ae2d628c1 100644 (file)
@@ -210,6 +210,10 @@ func (bigEndian) String() string { return "BigEndian" }
 
 func (bigEndian) GoString() string { return "binary.BigEndian" }
 
+func (nativeEndian) String() string { return "NativeEndian" }
+
+func (nativeEndian) GoString() string { return "binary.NativeEndian" }
+
 // Read reads structured binary data from r into data.
 // Data must be a pointer to a fixed-size value or a slice
 // of fixed-size values.