fix(go.sum): update ResolveSpec dependency to v1.0.87
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package attribute
|
||||
|
||||
import "reflect"
|
||||
|
||||
func asSlice[T any](v any) []T {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.Kind() != reflect.Array {
|
||||
return nil
|
||||
}
|
||||
cpy := make([]T, rv.Len())
|
||||
if len(cpy) > 0 {
|
||||
_ = reflect.Copy(reflect.ValueOf(cpy), rv)
|
||||
}
|
||||
return cpy
|
||||
}
|
||||
Reference in New Issue
Block a user