running go fmt
This commit is contained in:
parent
7ca86444e8
commit
8f55ca83ff
@ -1,8 +1,8 @@
|
|||||||
package cli_test
|
package cli_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"."
|
"."
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -348,7 +348,7 @@ func TestAppHelpPrinter(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestAppVersionPrinter(t *testing.T) {
|
func TestAppVersionPrinter(t *testing.T) {
|
||||||
oldPrinter := cli.VersionPrinter
|
oldPrinter := cli.VersionPrinter
|
||||||
defer func() {
|
defer func() {
|
||||||
cli.VersionPrinter = oldPrinter
|
cli.VersionPrinter = oldPrinter
|
||||||
}()
|
}()
|
||||||
@ -359,8 +359,8 @@ func TestAppVersionPrinter(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
ctx := cli.NewContext(app, nil, nil)
|
ctx := cli.NewContext(app, nil, nil)
|
||||||
cli.ShowVersion(ctx)
|
cli.ShowVersion(ctx)
|
||||||
|
|
||||||
if wasCalled == false {
|
if wasCalled == false {
|
||||||
t.Errorf("Version printer expected to be called, but was not")
|
t.Errorf("Version printer expected to be called, but was not")
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cli_test
|
package cli_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
|
||||||
"."
|
"."
|
||||||
|
"flag"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,12 +14,12 @@ func TestCommandDoNotIgnoreFlags(t *testing.T) {
|
|||||||
|
|
||||||
c := cli.NewContext(app, set, set)
|
c := cli.NewContext(app, set, set)
|
||||||
|
|
||||||
command := cli.Command {
|
command := cli.Command{
|
||||||
Name: "test-cmd",
|
Name: "test-cmd",
|
||||||
ShortName: "tc",
|
ShortName: "tc",
|
||||||
Usage: "this is for testing",
|
Usage: "this is for testing",
|
||||||
Description: "testing",
|
Description: "testing",
|
||||||
Action: func(_ *cli.Context) { },
|
Action: func(_ *cli.Context) {},
|
||||||
}
|
}
|
||||||
err := command.Run(c)
|
err := command.Run(c)
|
||||||
|
|
||||||
@ -34,12 +34,12 @@ func TestCommandIgnoreFlags(t *testing.T) {
|
|||||||
|
|
||||||
c := cli.NewContext(app, set, set)
|
c := cli.NewContext(app, set, set)
|
||||||
|
|
||||||
command := cli.Command {
|
command := cli.Command{
|
||||||
Name: "test-cmd",
|
Name: "test-cmd",
|
||||||
ShortName: "tc",
|
ShortName: "tc",
|
||||||
Usage: "this is for testing",
|
Usage: "this is for testing",
|
||||||
Description: "testing",
|
Description: "testing",
|
||||||
Action: func(_ *cli.Context) { },
|
Action: func(_ *cli.Context) {},
|
||||||
SkipFlagParsing: true,
|
SkipFlagParsing: true,
|
||||||
}
|
}
|
||||||
err := command.Run(c)
|
err := command.Run(c)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package cli_test
|
package cli_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
|
||||||
"."
|
"."
|
||||||
|
"flag"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user