mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 23:11:25 +02:00
repalce redirect_to_https with entrypoint middleware
This commit is contained in:
@@ -193,10 +193,19 @@ func Deserialize(src SerializedObject, dst any) E.Error {
|
||||
key = strutils.ToLowerNoSnake(key)
|
||||
mapping[key] = dstV.FieldByName(field.Name)
|
||||
fieldName[field.Name] = key
|
||||
|
||||
_, ok := field.Tag.Lookup("validate")
|
||||
if ok {
|
||||
needValidate = true
|
||||
}
|
||||
|
||||
aliases, ok := field.Tag.Lookup("aliases")
|
||||
if ok {
|
||||
for _, alias := range strings.Split(aliases, ",") {
|
||||
mapping[alias] = dstV.FieldByName(field.Name)
|
||||
fieldName[field.Name] = alias
|
||||
}
|
||||
}
|
||||
}
|
||||
for k, v := range src {
|
||||
if field, ok := mapping[strutils.ToLowerNoSnake(k)]; ok {
|
||||
|
||||
Reference in New Issue
Block a user