code: func ensureInt(x interface{}) int {
  	res, ok := x.(int)
  	if !ok {
  		res = int(x.(float64))
  	}
  	return res
  }
docs: // TODO: can we do without this when unmarshalling dynamic JSON?
  // why do integers in KDF params end up as float64 and not int after
  // unmarshal?