jsonconfig: remove TODO and revert bogus change; float always works apparently.

Change-Id: Ia80edbfd122063895ffb76d361c33b2cd70a725c
This commit is contained in:
mpl 2012-10-19 19:26:15 +02:00
parent 159c2a5216
commit 41e8215abe
1 changed files with 2 additions and 7 deletions

View File

@ -160,13 +160,8 @@ func (jc Obj) int(key string, def *int) int {
}
b, ok := ei.(float64)
if !ok {
// TODO(mpl): float or int? or both allowed? use a switch?
c, ok := ei.(int)
if !ok {
jc.appendError(fmt.Errorf("Expected config key %q to be a number", key))
return 0
}
return int(c)
jc.appendError(fmt.Errorf("Expected config key %q to be a number", key))
return 0
}
return int(b)
}