From d6ee6c2d0654b2274fb80a5d1ca6f72f4c2da094 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Thu, 19 Nov 2015 17:36:59 -0800 Subject: [PATCH] hash/crc32: rename iEEETable to ieeeTable iEEETable violates the Go naming conventions and is inconsistent with the rest of the package. Use ieeeTable instead. Change-Id: I04b201aa39759d159de2b0295f43da80488c2263 Reviewed-on: https://go-review.googlesource.com/17068 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick --- src/hash/crc32/crc32.go | 6 +++--- src/hash/crc32/crc32_amd64.go | 6 +++--- src/hash/crc32/crc32_amd64p32.go | 6 +++--- src/hash/crc32/crc32_generic.go | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/hash/crc32/crc32.go b/src/hash/crc32/crc32.go index d41755536e..dc5994885f 100644 --- a/src/hash/crc32/crc32.go +++ b/src/hash/crc32/crc32.go @@ -57,9 +57,9 @@ var IEEETable = makeTable(IEEE) // slicing8Table is array of 8 Tables type slicing8Table [8]Table -// iEEETable8 is the slicing8Table for IEEE -var iEEETable8 *slicing8Table -var iEEETable8Once sync.Once +// ieeeTable8 is the slicing8Table for IEEE +var ieeeTable8 *slicing8Table +var ieeeTable8Once sync.Once // MakeTable returns a Table constructed from the specified polynomial. // The contents of this Table must not be modified. diff --git a/src/hash/crc32/crc32_amd64.go b/src/hash/crc32/crc32_amd64.go index 13e483db85..01f86840d6 100644 --- a/src/hash/crc32/crc32_amd64.go +++ b/src/hash/crc32/crc32_amd64.go @@ -44,10 +44,10 @@ func updateIEEE(crc uint32, p []byte) uint32 { // only use slicing-by-8 when input is >= 4KB if len(p) >= 4096 { - iEEETable8Once.Do(func() { - iEEETable8 = makeTable8(IEEE) + ieeeTable8Once.Do(func() { + ieeeTable8 = makeTable8(IEEE) }) - return updateSlicingBy8(crc, iEEETable8, p) + return updateSlicingBy8(crc, ieeeTable8, p) } return update(crc, IEEETable, p) diff --git a/src/hash/crc32/crc32_amd64p32.go b/src/hash/crc32/crc32_amd64p32.go index 40241c5835..e6c2a523df 100644 --- a/src/hash/crc32/crc32_amd64p32.go +++ b/src/hash/crc32/crc32_amd64p32.go @@ -27,10 +27,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 { func updateIEEE(crc uint32, p []byte) uint32 { // only use slicing-by-8 when input is >= 4KB if len(p) >= 4096 { - iEEETable8Once.Do(func() { - iEEETable8 = makeTable8(IEEE) + ieeeTable8Once.Do(func() { + ieeeTable8 = makeTable8(IEEE) }) - return updateSlicingBy8(crc, iEEETable8, p) + return updateSlicingBy8(crc, ieeeTable8, p) } return update(crc, IEEETable, p) diff --git a/src/hash/crc32/crc32_generic.go b/src/hash/crc32/crc32_generic.go index cd79062ce9..8fc11a75db 100644 --- a/src/hash/crc32/crc32_generic.go +++ b/src/hash/crc32/crc32_generic.go @@ -16,10 +16,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 { func updateIEEE(crc uint32, p []byte) uint32 { // only use slicing-by-8 when input is >= 4KB if len(p) >= 4096 { - iEEETable8Once.Do(func() { - iEEETable8 = makeTable8(IEEE) + ieeeTable8Once.Do(func() { + ieeeTable8 = makeTable8(IEEE) }) - return updateSlicingBy8(crc, iEEETable8, p) + return updateSlicingBy8(crc, ieeeTable8, p) } return update(crc, IEEETable, p) }