Skip to content

Commit 5827a99

Browse files
authored
Merge pull request #531 from damiannolan/damian/fix-word-repetition-in-error
chore: fix duplicate word repetition in CreateChecksum error return
2 parents f4d23d9 + 7237574 commit 5827a99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func CreateChecksum(wasm []byte) (Checksum, error) {
5252
// magic number for Wasm is "\0asm"
5353
// See https://webassembly.github.io/spec/core/binary/modules.html#binary-module
5454
if !bytes.Equal(wasm[:4], []byte("\x00\x61\x73\x6D")) {
55-
return Checksum{}, fmt.Errorf("Wasm bytes do not not start with Wasm magic number")
55+
return Checksum{}, fmt.Errorf("Wasm bytes do not start with Wasm magic number")
5656
}
5757
hash := sha256.Sum256(wasm)
5858
return Checksum(hash[:]), nil

lib_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ func TestCreateChecksum(t *testing.T) {
2929

3030
// Text file fails
3131
_, err = CreateChecksum([]byte("Hello world"))
32-
require.ErrorContains(t, err, "do not not start with Wasm magic number")
32+
require.ErrorContains(t, err, "do not start with Wasm magic number")
3333
}

0 commit comments

Comments
 (0)