Skip to content
Merged
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
8 changes: 4 additions & 4 deletions cmp/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"os"
"reflect"
"regexp"
"sort"
Expand Down Expand Up @@ -58,7 +58,7 @@ const goldenFooterPrefix = ">>> "
// It is the user's responsibility to choose a sufficiently unique key name
// such that it never appears in the body of the value itself.
func mustParseGolden(path string) map[string]string {
b, err := ioutil.ReadFile(path)
b, err := os.ReadFile(path)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -97,7 +97,7 @@ func mustFormatGolden(path string, in []struct{ Name, Data string }) {
b = append(b, v.Data...)
b = append(b, goldenFooterPrefix+v.Name+"\n"...)
}
if err := ioutil.WriteFile(path, b, 0664); err != nil {
if err := os.WriteFile(path, b, 0664); err != nil {
panic(err)
}
}
Expand Down Expand Up @@ -2020,7 +2020,7 @@ func methodTests() []test {
if _, ok := t.MethodByName("Equal"); ok || t.Kind() == reflect.Ptr {
return false
}
if m, ok := reflect.PtrTo(t).MethodByName("Equal"); ok {
if m, ok := reflect.PointerTo(t).MethodByName("Equal"); ok {
tf := m.Func.Type()
return !tf.IsVariadic() && tf.NumIn() == 2 && tf.NumOut() == 1 &&
tf.In(0).AssignableTo(tf.In(1)) && tf.Out(0) == reflect.TypeOf(true)
Expand Down
Loading