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: urfave/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.17.2
Choose a base ref
...
head repository: urfave/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.18.0
Choose a head ref
  • 3 commits
  • 8 files changed
  • 2 contributors

Commits on Sep 30, 2022

  1. Call FlagStringer in String() method of slice flags

    The default help template relies on the String() method of Flag
    to render the flag. For most flag types, String() indirects through
    FlagStringer, so that is the best place to customize flag rendering.
    
    FlagStringer was not called for slice flags because their help output
    differs from other flags in two ways: there can be multiple default
    values, and the flag name is shown two times to indicate that the flag
    can be specified multiple times.
    
    To make multiple values work in the FlagStringer, I simply changed
    GetValue() to return all values.
    
    Showing the flag more than once is achieved through a new interface,
    DocGenerationSliceFlag, which the FlagStringer uses to decide whether
    the flag is a slice flag type.
    fjl committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    72cbb3d View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

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

Commits on Oct 6, 2022

  1. Merge pull request #1508 from fjl/slice-flag-stringer

    Call FlagStringer in String() method of slice flags
    dearchap authored Oct 6, 2022
    Configuration menu
    Copy the full SHA
    3c5c3a4 View commit details
    Browse the repository at this point in the history
Loading