Fix a few typos in the reflect package

This commit is contained in:
Michael Cristina 2020-05-13 12:19:47 -05:00
parent 501781abe4
commit b4d726fd6d
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import (
// that type. // that type.
type Equalities map[reflect.Type]reflect.Value type Equalities map[reflect.Type]reflect.Value
// For convenience, panics on errrors // For convenience, panics on errors
func EqualitiesOrDie(funcs ...interface{}) Equalities { func EqualitiesOrDie(funcs ...interface{}) Equalities {
e := Equalities{} e := Equalities{}
if err := e.AddFuncs(funcs...); err != nil { if err := e.AddFuncs(funcs...); err != nil {
@ -229,7 +229,7 @@ func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool,
// //
// An empty slice *is* equal to a nil slice for our purposes; same for maps. // An empty slice *is* equal to a nil slice for our purposes; same for maps.
// //
// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality // Unexported field members cannot be compared and will cause an informative panic; you must add an Equality
// function for these types. // function for these types.
func (e Equalities) DeepEqual(a1, a2 interface{}) bool { func (e Equalities) DeepEqual(a1, a2 interface{}) bool {
if a1 == nil || a2 == nil { if a1 == nil || a2 == nil {

View File

@ -72,7 +72,7 @@ func TestEqualities(t *testing.T) {
} }
} }
func TestDerivates(t *testing.T) { func TestDerivatives(t *testing.T) {
e := Equalities{} e := Equalities{}
type Bar struct { type Bar struct {
X int X int