diff options
| author | cuiweixie <cuiweixie@gmail.com> | 2023-01-29 16:42:17 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-01-30 18:51:09 +0000 |
| commit | 848d658c45b185efb6742e51ba261cbba801b6ee (patch) | |
| tree | 06d6d7c6618f1caebb1edd08c18bb4328c9254ac /src/encoding | |
| parent | 4c5d97990e4a39bd3e903f8e318b7234db3ba91f (diff) | |
| download | go-848d658c45b185efb6742e51ba261cbba801b6ee.tar.xz | |
encoding/binary: add String and GoString method to nativeEndian
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>
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/binary/binary.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/encoding/binary/binary.go b/src/encoding/binary/binary.go index 0681511fbb..cb2ad1a7f8 100644 --- a/src/encoding/binary/binary.go +++ b/src/encoding/binary/binary.go @@ -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. |
