Sfoglia il codice sorgente

RequestFiles fielder

0x4a52466c696e74 1 anno fa
parent
commit
2449f541f8
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      fielder.go

+ 2 - 2
fielder.go

@@ -76,7 +76,7 @@ func parseName(val reflect.Value) (res *Field, err error) {
 	return
 }
 
-func fieldVal(val reflect.Value, fieldName string, files map[string]IReadCloserLen, names ...any) (res reflect.Value, err IErrorArgs) {
+func fieldVal(val reflect.Value, fieldName string, files RequestFiles, names ...any) (res reflect.Value, err IErrorArgs) {
 	switch val.Kind() {
 	case reflect.Ptr, reflect.Interface:
 		return fieldVal(val.Elem(), fieldName, files, names...)
@@ -170,7 +170,7 @@ func fieldVal(val reflect.Value, fieldName string, files map[string]IReadCloserL
 }
 
 // Fields позволяет получить значения объекта в json
-func Fields(obj any, files map[string]IReadCloserLen, names ...any) (json.Map, IErrorArgs) {
+func Fields(obj any, files RequestFiles, names ...any) (json.Map, IErrorArgs) {
 	sVal := reflect.ValueOf(obj)
 	rVal, err := fieldVal(sVal.Elem(), "", files, names...)
 	if err != nil {