Moved handling of string response to int using the existing emptyStringInt method as part of UnmarshalJSON as per Pauls suggestion

This commit is contained in:
Ben Davies
2020-10-09 15:27:46 +01:00
committed by Paul Tyng
parent e7f9c5eb97
commit df937016b0
3 changed files with 15 additions and 8 deletions

View File

@@ -260,14 +260,6 @@ func main() {
f.OmitEmpty = true
return nil
}
case "NetworkConf":
resource.FieldProcessor = func(name string, f *FieldInfo) error {
switch name {
case "WANEgressQOS":
f.FieldType = "string"
}
return nil
}
case "SettingUsg":
resource.FieldProcessor = func(name string, f *FieldInfo) error {
if strings.HasSuffix(name, "Timeout") && name != "ArpCacheTimeout" {