You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Marco Massenzio (JIRA)" <ji...@apache.org> on 2015/05/26 18:17:18 UTC

[jira] [Created] (MESOS-2766) Add to FlagsBase the default --help behavior

Marco Massenzio created MESOS-2766:
--------------------------------------

             Summary: Add to FlagsBase the default --help behavior
                 Key: MESOS-2766
                 URL: https://issues.apache.org/jira/browse/MESOS-2766
             Project: Mesos
          Issue Type: Bug
          Components: stout
            Reporter: Marco Massenzio
            Priority: Minor


In every "launcher" file (ie, those containing some variation on {{main()}}) there is a minor variation on:
{code}
  if (flags.help) {
    cout << flags.usage() << endl;
    // arguably this is not an error: the user asked for help,
    // and she got it: // the program execution ought to be
    // considered successful.
    return EXIT_SUCCESS;
  }
{code}

As this is default behavior, and we've added support for the {{--help}} flag in the {{BaseFlags}} class, we should add this too there and remove it from everywhere else.

This follows the DRY principle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)