diff options
Diffstat (limited to 'internal/form/form.go')
-rw-r--r-- | internal/form/form.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/form/form.go b/internal/form/form.go index bddbd128..bca9f9cb 100644 --- a/internal/form/form.go +++ b/internal/form/form.go @@ -26,7 +26,7 @@ func init() { IsMatch: func(rule string) bool { return rule == "AlphaDashDotSlash" }, - IsValid: func(errs binding.Errors, name string, v interface{}) (bool, binding.Errors) { + IsValid: func(errs binding.Errors, name string, v any) (bool, binding.Errors) { if AlphaDashDotSlashPattern.MatchString(fmt.Sprintf("%v", v)) { errs.Add([]string{name}, ERR_ALPHA_DASH_DOT_SLASH, "AlphaDashDotSlash") return false, errs @@ -41,7 +41,7 @@ type Form interface { } // Assign assign form values back to the template data. -func Assign(form interface{}, data map[string]interface{}) { +func Assign(form any, data map[string]any) { typ := reflect.TypeOf(form) val := reflect.ValueOf(form) @@ -90,7 +90,7 @@ func getInclude(field reflect.StructField) string { return getRuleBody(field, "Include(") } -func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaron.Locale) binding.Errors { +func validate(errs binding.Errors, data map[string]any, f Form, l macaron.Locale) binding.Errors { if errs.Len() == 0 { return errs } |