code: func toInt(v reflect.Value) (int64, error) {
  	switch v.Kind() {
  	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
  		return v.Int(), nil
  	case reflect.Interface:
  		return toInt(v.Elem())
  	}
  	return -1, errors.New("unable to convert value to int")
  }
docs: // toInt returns the int value if possible, -1 if not.
  // TODO(bep) consolidate all these reflect funcs.