assertion_compare_legacy.go 399 B

12345678910111213141516
  1. //go:build !go1.17
  2. // +build !go1.17
  3. // TODO: once support for Go 1.16 is dropped, this file can be
  4. // merged/removed with assertion_compare_go1.17_test.go and
  5. // assertion_compare_can_convert.go
  6. package assert
  7. import "reflect"
  8. // Older versions of Go does not have the reflect.Value.CanConvert
  9. // method.
  10. func canConvert(value reflect.Value, to reflect.Type) bool {
  11. return false
  12. }