diff --git a/internal/difflib/difflib.go b/internal/difflib/difflib.go index 9984599b4..2332f18bc 100644 --- a/internal/difflib/difflib.go +++ b/internal/difflib/difflib.go @@ -71,7 +71,7 @@ type OpCode struct { // notion, pairing up elements that appear uniquely in each sequence. // That, and the method here, appear to yield more intuitive difference // reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in +// to syncing up on blocks of "junk lines", though (like blank lines in // ordinary text files, or maybe "

" lines in HTML files). That may be // because this is the only method of the 3 that has a *concept* of // "junk" . diff --git a/internal/spew/common.go b/internal/spew/common.go index 1be8ce945..ec2a1f745 100644 --- a/internal/spew/common.go +++ b/internal/spew/common.go @@ -100,7 +100,7 @@ func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) // Choose whether or not to do error and Stringer interface lookups against // the base type or a pointer to the base type depending on settings. // Technically calling one of these methods with a pointer receiver can - // mutate the value, however, types which choose to satisify an error or + // mutate the value, however, types which choose to satisfy an error or // Stringer interface with a pointer receiver should not be mutating their // state inside these interface methods. if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { diff --git a/internal/spew/config.go b/internal/spew/config.go index 161895fc6..84c6eab8e 100644 --- a/internal/spew/config.go +++ b/internal/spew/config.go @@ -59,7 +59,7 @@ type ConfigState struct { // // NOTE: This might be an unsafe action since calling one of these methods // with a pointer receiver could technically mutate the value, however, - // in practice, types which choose to satisify an error or Stringer + // in practice, types which choose to satisfy an error or Stringer // interface with a pointer receiver should not be mutating their state // inside these interface methods. As a result, this option relies on // access to the unsafe package, so it will not have any effect when diff --git a/internal/spew/dumpcgo_test.go b/internal/spew/dumpcgo_test.go index 84421ac3a..73a1edc2e 100644 --- a/internal/spew/dumpcgo_test.go +++ b/internal/spew/dumpcgo_test.go @@ -15,7 +15,7 @@ // NOTE: Due to the following build constraints, this file will only be compiled // when both cgo is supported and "-tags testcgo" is added to the go test // command line. This means the cgo tests are only added (and hence run) when -// specifially requested. This configuration is used because spew itself +// specifically requested. This configuration is used because spew itself // does not require cgo to run even though it does handle certain cgo types // specially. Rather than forcing all clients to require cgo and an external // C compiler just to run the tests, this scheme makes them optional. diff --git a/internal/spew/format.go b/internal/spew/format.go index b04edb7d7..ba8e12d04 100644 --- a/internal/spew/format.go +++ b/internal/spew/format.go @@ -121,7 +121,7 @@ func (f *formatState) formatPtr(v reflect.Value) { // Keep list of all dereferenced pointers to possibly show later. pointerChain := make([]uintptr, 0) - // Figure out how many levels of indirection there are by derferencing + // Figure out how many levels of indirection there are by dereferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false diff --git a/internal/spew/internalunsafe_test.go b/internal/spew/internalunsafe_test.go index 2b547c41c..aa8fa00b1 100644 --- a/internal/spew/internalunsafe_test.go +++ b/internal/spew/internalunsafe_test.go @@ -47,7 +47,7 @@ func changeKind(v *reflect.Value, readOnly bool) { *flags |= flagKindMask } -// TestAddedReflectValue tests functionaly of the dump and formatter code which +// TestAddedReflectValue tests functionality of the dump and formatter code which // falls back to the standard fmt library for new types that might get added to // the language. func TestAddedReflectValue(t *testing.T) { diff --git a/mock/mock.go b/mock/mock.go index 7f4d28d5e..396c91487 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -1294,13 +1294,13 @@ func runtimeFunc(opt interface{}) *runtime.Func { func funcName(f *runtime.Func) string { name := f.Name() trimmed := strings.TrimSuffix(path.Base(name), path.Ext(name)) - splitted := strings.Split(trimmed, ".") + parts := strings.Split(trimmed, ".") - if len(splitted) == 0 { + if len(parts) == 0 { return trimmed } - return splitted[len(splitted)-1] + return parts[len(parts)-1] } func isFuncSame(f1, f2 *runtime.Func) bool {