diff options
| author | Ian Lance Taylor <iant@golang.org> | 2025-01-09 14:42:16 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-02-06 16:40:55 -0800 |
| commit | 7c6b047ea14dcc6aa948f901956511c4e8691abf (patch) | |
| tree | 3b8a8cc77c329ac782d8a07320ce47c34b899cb6 /src/encoding | |
| parent | 5c9b13d90f4c751c61ccb4560f79a1189cab2279 (diff) | |
| download | go-7c6b047ea14dcc6aa948f901956511c4e8691abf.tar.xz | |
encoding/base64: use internal/byteorder
This permits us to remove the dependency on reflect.
Change-Id: I60b1e9fd713f340bfd5eec2edfa58fc724a8e2d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/641936
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/base64/base64.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoding/base64/base64.go b/src/encoding/base64/base64.go index f94bea132c..57aa1a697f 100644 --- a/src/encoding/base64/base64.go +++ b/src/encoding/base64/base64.go @@ -6,7 +6,7 @@ package base64 import ( - "encoding/binary" + "internal/byteorder" "io" "slices" "strconv" @@ -538,7 +538,7 @@ func (enc *Encoding) Decode(dst, src []byte) (n int, err error) { enc.decodeMap[src2[6]], enc.decodeMap[src2[7]], ); ok { - binary.BigEndian.PutUint64(dst[n:], dn) + byteorder.BEPutUint64(dst[n:], dn) n += 6 si += 8 } else { @@ -559,7 +559,7 @@ func (enc *Encoding) Decode(dst, src []byte) (n int, err error) { enc.decodeMap[src2[2]], enc.decodeMap[src2[3]], ); ok { - binary.BigEndian.PutUint32(dst[n:], dn) + byteorder.BEPutUint32(dst[n:], dn) n += 3 si += 4 } else { |
