Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/difflib/difflib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<P>" lines in HTML files). That may be
// because this is the only method of the 3 that has a *concept* of
// "junk" <wink>.
Expand Down
2 changes: 1 addition & 1 deletion internal/spew/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion internal/spew/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/spew/dumpcgo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/spew/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/spew/internalunsafe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down