aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/cipher
diff options
context:
space:
mode:
authornlwkobe30 <nlwkobe30@gmail.com>2024-08-30 19:05:07 +0000
committerGopher Robot <gobot@golang.org>2024-09-03 20:55:15 +0000
commit7cd0a4be5cdbb84142ec330daba6087eece48341 (patch)
tree498439f59e7cf228c9427c540bccdc7c2930fe7c /src/crypto/cipher
parentb8e533a7cdc60d84a0c52bfaf3dcb5bf148ac3a8 (diff)
downloadgo-7cd0a4be5cdbb84142ec330daba6087eece48341.tar.xz
all: omit unnecessary 0 in slice expression
All changes are related to the code, except for the comments in src/regexp/syntax/parse.go and src/slices/slices.go. Change-Id: I73c5d3c54099749b62210aa7f3182c5eb84bb6a6 GitHub-Last-Rev: 794aa9b0539811d00e1cd42be1e8d9fe9afe0281 GitHub-Pull-Request: golang/go#69170 Reviewed-on: https://go-review.googlesource.com/c/go/+/609678 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/crypto/cipher')
-rw-r--r--src/crypto/cipher/ctr_aes_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/cipher/ctr_aes_test.go b/src/crypto/cipher/ctr_aes_test.go
index d019ae0d02..c82a8757ab 100644
--- a/src/crypto/cipher/ctr_aes_test.go
+++ b/src/crypto/cipher/ctr_aes_test.go
@@ -80,7 +80,7 @@ func TestCTR_AES(t *testing.T) {
ctr := cipher.NewCTR(c, tt.iv)
encrypted := make([]byte, len(in))
ctr.XORKeyStream(encrypted, in)
- if out := tt.out[0:len(in)]; !bytes.Equal(out, encrypted) {
+ if out := tt.out[:len(in)]; !bytes.Equal(out, encrypted) {
t.Errorf("%s/%d: CTR\ninpt %x\nhave %x\nwant %x", test, len(in), in, encrypted, out)
}
}
@@ -90,7 +90,7 @@ func TestCTR_AES(t *testing.T) {
ctr := cipher.NewCTR(c, tt.iv)
plain := make([]byte, len(in))
ctr.XORKeyStream(plain, in)
- if out := tt.in[0:len(in)]; !bytes.Equal(out, plain) {
+ if out := tt.in[:len(in)]; !bytes.Equal(out, plain) {
t.Errorf("%s/%d: CTRReader\nhave %x\nwant %x", test, len(out), plain, out)
}
}