2022-04-06 23:20:29 +00:00
|
|
|
//go:build go1.17
|
|
|
|
// +build go1.17
|
|
|
|
|
|
|
|
// TODO: once support for Go 1.16 is dropped, this file can be
|
|
|
|
// merged/removed with assertion_compare_go1.17_test.go and
|
|
|
|
// assertion_compare_legacy.go
|
|
|
|
|
|
|
|
package assert
|
|
|
|
|
|
|
|
import "reflect"
|
|
|
|
|
2023-01-11 00:12:59 +00:00
|
|
|
// Wrapper around reflect.Value.CanConvert, for compatibility
|
2022-04-06 23:20:29 +00:00
|
|
|
// reasons.
|
|
|
|
func canConvert(value reflect.Value, to reflect.Type) bool {
|
|
|
|
return value.CanConvert(to)
|
|
|
|
}
|