all: Use protobuf to generate config structs (fixes #6734) (#6900)

This commit is contained in:
Audrius Butkevicius
2020-08-25 08:11:14 +02:00
committed by GitHub
parent 5b953033c7
commit d507d932b8
84 changed files with 3807 additions and 542 deletions
+2 -2
View File
@@ -58,14 +58,14 @@ func SetDefaults(data interface{}) {
case string:
f.SetString(v)
case int:
case int, uint32, int32, int64, uint64:
i, err := strconv.ParseInt(v, 10, 64)
if err != nil {
panic(err)
}
f.SetInt(i)
case float64:
case float64, float32:
i, err := strconv.ParseFloat(v, 64)
if err != nil {
panic(err)