summaryrefslogtreecommitdiffstats
path: root/modules/web/middleware/binding.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/web/middleware/binding.go')
-rw-r--r--modules/web/middleware/binding.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/web/middleware/binding.go b/modules/web/middleware/binding.go
index 9b0b1d7784..c9dc4a8f59 100644
--- a/modules/web/middleware/binding.go
+++ b/modules/web/middleware/binding.go
@@ -10,10 +10,10 @@ import (
"strings"
"code.gitea.io/gitea/modules/translation"
+ "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/validation"
"gitea.com/go-chi/binding"
- "github.com/unknwon/com"
)
// Form form binding interface
@@ -22,7 +22,7 @@ type Form interface {
}
func init() {
- binding.SetNameMapper(com.ToSnakeCase)
+ binding.SetNameMapper(util.ToSnakeCase)
}
// AssignForm assign form values back to the template data.
@@ -43,7 +43,7 @@ func AssignForm(form interface{}, data map[string]interface{}) {
if fieldName == "-" {
continue
} else if len(fieldName) == 0 {
- fieldName = com.ToSnakeCase(field.Name)
+ fieldName = util.ToSnakeCase(field.Name)
}
data[fieldName] = val.Field(i).Interface()