compiler/cpp/src/generate/t_go_generator.cc
/**
 * Declares an argument, which may include initialization as necessary.
 *
 * @param tfield The field
 */
Declares an argument, which may include initialization as necessary.
@param tfield The field
Declares an argument which may include initialization as necessary . @param tfield The field
string t_go_generator::declare_argument(t_field* tfield) {
  std::ostringstream result;
  result << publicize(tfield->get_name()) << "=";
  if (tfield->get_value() != NULL) {
    result << "thrift_spec[" <<
      tfield->get_key() << "][4]";
  } else {
    result << "nil";
  }
  return result.str();
}
string t_go_generator :: declare_argument ( t_field * tfield ) { std :: ostringstream result ; result << publicize ( tfield -> get_name ( ) ) << " " ; if ( tfield -> get_value ( ) != NULL ) { result << " " << tfield -> get_key ( ) << " " ; } else { result << " " ; } return result . str ( ) ; }
Declares an argument, which may include initialization as necessary.
Declares an argument which may include initialization as necessary .