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.19.3
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.20.0
Choose a head ref
  • 14 commits
  • 13 files changed
  • 2 contributors

Commits on Oct 9, 2022

  1. Initial cut

    dearchap committed Oct 9, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    kzaher Krunoslav Zaher
    Copy the full SHA
    d5947d7 View commit details
  2. Merge latest and fix tests

    dearchap committed Oct 9, 2022
    Copy the full SHA
    bc9ae33 View commit details
  3. Fix altsrc tests

    dearchap committed Oct 9, 2022
    Copy the full SHA
    fa21c74 View commit details
  4. Fix docs

    dearchap committed Oct 9, 2022
    Copy the full SHA
    2576c0c View commit details
  5. Fix docs

    dearchap committed Oct 9, 2022
    Copy the full SHA
    00ef229 View commit details
  6. Cleanup

    dearchap committed Oct 9, 2022
    Copy the full SHA
    2047c66 View commit details
  7. Rebase origin

    dearchap committed Oct 9, 2022
    Copy the full SHA
    adcce13 View commit details

Commits on Oct 10, 2022

  1. make cmd.Run use varargs

    dearchap committed Oct 10, 2022
    Copy the full SHA
    59095aa View commit details

Commits on Oct 11, 2022

  1. Changes from code review

    dearchap committed Oct 11, 2022
    Copy the full SHA
    a9d6b0d View commit details
  2. Fix tests

    dearchap committed Oct 11, 2022
    Copy the full SHA
    4a109bc View commit details
  3. Copy the full SHA
    00afca4 View commit details
  4. Update docs

    dearchap committed Oct 11, 2022
    Copy the full SHA
    5100c9d View commit details

Commits on Oct 14, 2022

  1. Update app.go

    Co-authored-by: Dan Buch <dan@meatballhat.com>
    dearchap and meatballhat authored Oct 14, 2022
    Copy the full SHA
    33d08c3 View commit details
  2. Copy the full SHA
    0d0d329 View commit details
Showing with 292 additions and 422 deletions.
  1. +9 −9 altsrc/json_command_test.go
  2. +9 −9 altsrc/toml_command_test.go
  3. +9 −9 altsrc/yaml_command_test.go
  4. +44 −244 app.go
  5. +6 −21 app_test.go
  6. +163 −96 command.go
  7. +4 −3 command_test.go
  8. +11 −6 godoc-current.txt
  9. +19 −12 help.go
  10. +5 −5 help_test.go
  11. +1 −1 suggestions_test.go
  12. +1 −1 template.go
  13. +11 −6 testdata/godoc-v2.x.txt
18 changes: 9 additions & 9 deletions altsrc/json_command_test.go
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ func TestCommandJSONFileTest(t *testing.T) {
},
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -81,7 +81,7 @@ func TestCommandJSONFileTestGlobalEnvVarWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -116,7 +116,7 @@ func TestCommandJSONFileTestGlobalEnvVarWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -148,7 +148,7 @@ func TestCommandJSONFileTestSpecifiedFlagWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -180,7 +180,7 @@ func TestCommandJSONFileTestSpecifiedFlagWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -212,7 +212,7 @@ func TestCommandJSONFileTestDefaultValueFileWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -244,7 +244,7 @@ func TestCommandJSONFileTestDefaultValueFileWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -278,7 +278,7 @@ func TestCommandJSONFileFlagHasDefaultGlobalEnvJSONSetGlobalEnvWins(t *testing.T
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -312,7 +312,7 @@ func TestCommandJSONFileFlagHasDefaultGlobalEnvJSONSetGlobalEnvWinsNested(t *tes
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewJSONSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
18 changes: 9 additions & 9 deletions altsrc/toml_command_test.go
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ func TestCommandTomFileTest(t *testing.T) {
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -68,7 +68,7 @@ func TestCommandTomlFileTestGlobalEnvVarWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -102,7 +102,7 @@ func TestCommandTomlFileTestGlobalEnvVarWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -134,7 +134,7 @@ func TestCommandTomlFileTestSpecifiedFlagWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -167,7 +167,7 @@ func TestCommandTomlFileTestSpecifiedFlagWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -199,7 +199,7 @@ func TestCommandTomlFileTestDefaultValueFileWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -231,7 +231,7 @@ func TestCommandTomlFileTestDefaultValueFileWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -265,7 +265,7 @@ func TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWins(t *testing.T
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -299,7 +299,7 @@ func TestCommandTomlFileFlagHasDefaultGlobalEnvTomlSetGlobalEnvWinsNested(t *tes
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewTomlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
18 changes: 9 additions & 9 deletions altsrc/yaml_command_test.go
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ func TestCommandYamlFileTest(t *testing.T) {
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -68,7 +68,7 @@ func TestCommandYamlFileTestGlobalEnvVarWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -103,7 +103,7 @@ func TestCommandYamlFileTestGlobalEnvVarWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -135,7 +135,7 @@ func TestCommandYamlFileTestSpecifiedFlagWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -168,7 +168,7 @@ func TestCommandYamlFileTestSpecifiedFlagWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -200,7 +200,7 @@ func TestCommandYamlFileTestDefaultValueFileWins(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -233,7 +233,7 @@ func TestCommandYamlFileTestDefaultValueFileWinsNested(t *testing.T) {
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))

err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -267,7 +267,7 @@ func TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWins(t *testing.T
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
@@ -302,7 +302,7 @@ func TestCommandYamlFileFlagHasDefaultGlobalEnvYamlSetGlobalEnvWinsNested(t *tes
&cli.StringFlag{Name: "load"}},
}
command.Before = InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
err := command.Run(c)
err := command.Run(c, test...)

expect(t, err, nil)
}
Loading