Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spf13/cobra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: dnephin/cobra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 7 files changed
  • 3 contributors

Commits on Jun 23, 2016

  1. Allow commands to explicitly state if they do, or do not take arbitra…

    …ry arguments
    eparis authored and dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    8f9eb04 View commit details
    Browse the repository at this point in the history
  2. Check that arguments are in ValidArgs

    If a command defined cmd.ValidArgs check that the argument is actually
    in ValidArgs and fail if it is not.
    eparis authored and dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    50d6a0c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    39f6f22 View commit details
    Browse the repository at this point in the history
  4. Refactor TakesArgs to use an interface for arg validation.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    6a3228b View commit details
    Browse the repository at this point in the history
  5. Move arg validation to after flag validation so that the help flag is…

    … run first.
    
    Add MinimumNArgs(1) to a test cmd to verify behaviour.
    
    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    e6428ea View commit details
    Browse the repository at this point in the history
  6. Pass the same args to ValidateArgs as the Run methods receive.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    d3ffbb2 View commit details
    Browse the repository at this point in the history
  7. Add support for setting a function to handle flag parsing errors.

    The default pflag error is to only print the bad flag. This enables an application
    to include a usage message or other details about the error.
    
    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    c3463aa View commit details
    Browse the repository at this point in the history
  8. Merge persistent flags before checking for a help flag.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 23, 2016
    Configuration menu
    Copy the full SHA
    2a02d71 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2016

  1. Traverse commands for args on parents.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    ec02ead View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2016

  1. Add more Traverse tests.

    dnephin committed Jun 29, 2016
    Configuration menu
    Copy the full SHA
    33c9f26 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2016

  1. Fix a bug in traversal with detecting flags.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    8e4c18b View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2016

  1. Add a tags field for user defined tags on a Command.

    Signed-off-by: Daniel Nephin <[email protected]>
    dnephin committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    962b765 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from dnephin/add-tags

    Add a tags field for user defined tags on a Command
    dnephin authored Nov 3, 2016
    Configuration menu
    Copy the full SHA
    a3c0924 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2017

  1. Allow examples to be formatted

    Signed-off-by: Kenfe-Mickael Laventure <[email protected]>
    mlaventure committed Jan 13, 2017
    Configuration menu
    Copy the full SHA
    54e37c5 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from mlaventure/let-examples-be-processed

    Allow examples to be formatted
    dnephin authored Jan 13, 2017
    Configuration menu
    Copy the full SHA
    0e9ca70 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2017

  1. Configuration menu
    Copy the full SHA
    5d13e8c View commit details
    Browse the repository at this point in the history
Loading