go/src/hash/crc32
Erik Pellizzon f6436c60e4 hash/crc32: remove redundant code
Merge the CRC32 Update and Write functions using an unexported function, to avoid duplication of code and make it more readable.
The only difference between them is the check of the initialization of the IEEE table, and a boolean value specifies that.

Throughout the crc32.go file, in the switches the default value is inserted inside the switch statement, this change uniforms the style of the MakeTable function, making it like the other pieces of code.

Change-Id: I3889f6c6671210c82f0d7250cea67907bccf3ce7
GitHub-Last-Rev: b8777ee213
GitHub-Pull-Request: golang/go#55044
Reviewed-on: https://go-review.googlesource.com/c/go/+/430456
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
2022-09-15 21:07:21 +00:00
..
crc32.go hash/crc32: remove redundant code 2022-09-15 21:07:21 +00:00
crc32_amd64.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
crc32_amd64.s
crc32_arm64.go hash/crc32: fix typo in arm64 archInitCastagnoli panic message 2022-05-25 05:31:01 +00:00
crc32_arm64.s hash/crc32: use LDP instead of LDR in crc32 computation 2022-08-10 08:57:33 +00:00
crc32_generic.go
crc32_otherarch.go
crc32_ppc64le.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
crc32_ppc64le.s
crc32_s390x.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
crc32_s390x.s
crc32_table_ppc64le.s
crc32_test.go hash/crc32: remove redundant code 2022-09-15 21:07:21 +00:00
example_test.go
gen_const_ppc64le.go