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

@ -197,7 +197,7 @@ func WritePrometheusExpositionFormat(w io.Writer) {
const (
// metricLogNameFrequency is how often a metric's name=>id
// mapping is redundantly put in the logs. In other words,
// this is how how far in the logs you need to fetch from a
// this is how far in the logs you need to fetch from a
// given point in time to recompute the metrics at that point
// in time.
metricLogNameFrequency = 4 * time.Hour

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 {

View File

@ -104,7 +104,7 @@ func TestSanitizeLabel(t *testing.T) {
{"mixed", "Avery's iPhone 4(SE)", "averys-iphone-4se"},
{"dotted", "mon.ipn.dev", "mon-ipn-dev"},
{"email", "admin@example.com", "admin-example-com"},
{"boudary", ".bound.ary.", "bound-ary"},
{"boundary", ".bound.ary.", "bound-ary"},
{"bad_trailing", "a-", "a"},
{"bad_leading", "-a", "a"},
{"bad_both", "-a-", "a"},

View File

@ -52,7 +52,7 @@ func NonNil(ptr interface{}) {
// NonNilSliceForJSON makes sure that *slicePtr is non-nil so it will
// won't be omitted from JSON serialization and possibly confuse JavaScript
// clients expecting it to be preesnt.
// clients expecting it to be present.
func NonNilSliceForJSON[T any, S ~[]T](slicePtr *S) {
if *slicePtr != nil {
return
@ -62,7 +62,7 @@ func NonNilSliceForJSON[T any, S ~[]T](slicePtr *S) {
// NonNilMapForJSON makes sure that *slicePtr is non-nil so it will
// won't be omitted from JSON serialization and possibly confuse JavaScript
// clients expecting it to be preesnt.
// clients expecting it to be present.
func NonNilMapForJSON[K comparable, V any, M ~map[K]V](mapPtr *M) {
if *mapPtr != nil {
return