]> Cypherpunks repositories - gostls13.git/commit
hash/crc32,hash/crc64: use sync.OnceFunc
authorapocelipes <seve3r@outlook.com>
Thu, 26 Sep 2024 08:08:07 +0000 (08:08 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 26 Sep 2024 19:48:18 +0000 (19:48 +0000)
commit9ace960d545d29ff6326732bed36b5a68ba3e7e7
treee10cbb038f749273cb00910ce1c57dd449a30787
parentca3b1b13de4a6e66f0bd8e4678963e221a32b940
hash/crc32,hash/crc64: use sync.OnceFunc

Use sync.OnceFunc to simplify the code and to reduce global variables.

Change-Id: I7676339177e082c5be93dcf8121e379a6a7de912
GitHub-Last-Rev: f796c49260ad19c33b616c9543b99f7f425dc2fe
GitHub-Pull-Request: golang/go#69633
Reviewed-on: https://go-review.googlesource.com/c/go/+/615920
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/hash/crc32/crc32.go
src/hash/crc64/crc64.go