all: fix spelling mistakes

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref
2022-09-25 14:29:55 -04:00
committed by Brad Fitzpatrick
parent e73657d7aa
commit d4811f11a0
82 changed files with 143 additions and 143 deletions

View File

@@ -434,7 +434,7 @@ func makeMapHasher(t reflect.Type) typeHasherFunc {
mh := mapHasherPool.Get().(*mapHasher)
defer mapHasherPool.Put(mh)
// Hash a map in a sort-free mannar.
// Hash a map in a sort-free manner.
// It relies on a map being a an unordered set of KV entries.
// So long as we hash each KV entry together, we can XOR all the
// individual hashes to produce a unique hash for the entire map.

View File

@@ -552,7 +552,7 @@ func TestGetTypeHasher(t *testing.T) {
out: "\x01\x00\x00\x00\x02\x00\x00\x00\x03\x04\x00\x00\x00",
},
{
name: "IntIntByteInt-canddr",
name: "IntIntByteInt-canaddr",
val: &IntIntByteInt{1, 2, 3, 4},
out: "\x01\x01\x00\x00\x00\x02\x00\x00\x00\x03\x04\x00\x00\x00",
},
@@ -604,9 +604,9 @@ func TestSliceCycle(t *testing.T) {
type S []S
c := qt.New(t)
a := make(S, 1) // cylic graph of 1 node
a := make(S, 1) // cyclic graph of 1 node
a[0] = a
b := make(S, 1) // cylic graph of 1 node
b := make(S, 1) // cyclic graph of 1 node
b[0] = b
ha := Hash(&a)
hb := Hash(&b)
@@ -642,9 +642,9 @@ func TestMapCycle(t *testing.T) {
type M map[string]M
c := qt.New(t)
a := make(M) // cylic graph of 1 node
a := make(M) // cyclic graph of 1 node
a["self"] = a
b := make(M) // cylic graph of 1 node
b := make(M) // cyclic graph of 1 node
b["self"] = b
ha := Hash(&a)
hb := Hash(&b)
@@ -897,7 +897,7 @@ func TestArrayAllocs(t *testing.T) {
// In theory, there should be no allocations. However, escape analysis on
// certain architectures fails to detect that certain cases do not escape.
// This discrepency currently affects sha256.digest.Sum.
// This discrepancy currently affects sha256.digest.Sum.
// Measure the number of allocations in sha256 to ensure that Hash does
// not allocate on top of its usage of sha256.
// See https://golang.org/issue/48055.

View File

@@ -27,7 +27,7 @@ import (
// rely on pointer.asValue to convert the pointer back to a reflect.Value.
// Conversion of an unsafe.Pointer to reflect.Value guarantees that the
// read-only flag in the reflect.Value is unpopulated, avoiding panics that may
// othewise have occurred since the value was obtained from an unexported field.
// otherwise have occurred since the value was obtained from an unexported field.
type unsafePointer struct{ p unsafe.Pointer }
func unsafePointerOf(v reflect.Value) unsafePointer {