1 // Copied from https://github.com/stretchr/testify/blob/1333b5d3bda8cf5aedcf3e1aaa95cac28aaab892/assert/assertion_compare_can_convert.go 2 3 // Copyright 2020 Mat Ryer, Tyler Bunnell and all contributors. All rights reserved. 4 // Use of this source code is governed by an MIT-style license that can be found in 5 // the THIRD-PARTY-NOTICES file. 6 7 //go:build go1.17 8 // +build go1.17 9 10 package assert 11 12 import "reflect" 13 14 // Wrapper around reflect.Value.CanConvert, for compatibility 15 // reasons. 16 func canConvert(value reflect.Value, to reflect.Type) bool { 17 return value.CanConvert(to) 18 } 19