compiler/cpp/src/generate/t_go_generator.cc
/**
 * Renders a field default value, returns nil otherwise.
 *
 * @param tfield The field
 */
Renders a field default value, returns nil otherwise.
@param tfield The field
Renders a field default value returns nil otherwise . @param tfield The field
string t_go_generator::render_field_default_value(t_field* tfield, const string& name) {
  t_type* type = get_true_type(tfield->get_type());
  if (tfield->get_value() != NULL) {
    return render_const_value(type, tfield->get_value(), name);
  } else {
    return "nil";
  }
}
string t_go_generator :: render_field_default_value ( t_field * tfield , const string & name ) { t_type * type = get_true_type ( tfield -> get_type ( ) ) ; if ( tfield -> get_value ( ) != NULL ) { return render_const_value ( type , tfield -> get_value ( ) , name ) ; } else { return " " ; } }
Renders a field default value, returns nil otherwise.
Renders a field default value returns nil otherwise .