Browse Source

添加反射函数

yjp 6 months ago
parent
commit
5c120f0b5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      reflectutils/value.go

+ 1 - 1
reflectutils/value.go

@@ -40,7 +40,7 @@ func SliceValueElem(v reflect.Value) reflect.Value {
 	return elem
 	return elem
 }
 }
 
 
-func IsSliceValueOf(v reflect.Type, elementKind reflect.Kind) bool {
+func IsSliceValueOf(v reflect.Value, elementKind reflect.Kind) bool {
 	return v.Kind() == reflect.Slice && v.Elem().Kind() == elementKind
 	return v.Kind() == reflect.Slice && v.Elem().Kind() == elementKind
 }
 }