Permalink
Browse files

Fix `make lint` issues

  • Loading branch information...
1 parent 1fd696a commit 8d049482cee1f460fc6d7fb00f55cb3a5843228b @gsamokovarov committed Mar 26, 2017
Showing with 11 additions and 11 deletions.
  1. +1 −1 cli/args_test.go
  2. +4 −4 cli/registry_test.go
  3. +1 −1 cmd/help_test.go
  4. +4 −4 cmd/shell_test.go
  5. +1 −1 cmd/version_test.go
View
@@ -17,7 +17,7 @@ func TestFirst(t *testing.T) {
args := ParseArgs([]string{"program", "command"})
if args.First() != "command" {
- t.Error("Expected args.First() to be command, got %v", args.First())
+ t.Errorf("Expected args.First() to be command, got %v", args.First())
}
}
View
@@ -12,11 +12,11 @@ func TestCommandRegistryCommands(t *testing.T) {
for i, cmd := range registry.Commands() {
if i == 0 && cmd.Name != "bar" {
- t.Error("Expected command at 0 to be bar, got %v", cmd)
+ t.Errorf("Expected command at 0 to be bar, got %v", cmd)
}
if i == 1 && cmd.Name != "foo" {
- t.Error("Expected command at 1 to be foo, got %v", cmd)
+ t.Errorf("Expected command at 1 to be foo, got %v", cmd)
}
}
}
@@ -31,11 +31,11 @@ func TestCommandRegistryOptions(t *testing.T) {
for i, cmd := range options {
if i == 0 && cmd.Name != "--halp" {
- t.Error("Expected command at 0 to be --halp, got %v", cmd)
+ t.Errorf("Expected command at 0 to be --halp, got %v", cmd)
}
}
if len(options) != 1 {
- t.Error("Expected only 1 option, got %v", options)
+ t.Errorf("Expected only 1 option, got %v", options)
}
}
View
@@ -4,7 +4,7 @@ import (
"github.com/gsamokovarov/jump/cli"
)
-func ExampleHelpCmd() {
+func Example_helpCmd() {
helpCmd(cli.Args{}, nil)
// Output:
View
@@ -4,7 +4,7 @@ import (
"github.com/gsamokovarov/jump/cli"
)
-func ExampleShellCmd_Bash() {
+func Example_shellCmd_Bash() {
shellCmd(cli.Args{"bash"}, nil)
// Output:
@@ -31,7 +31,7 @@ func ExampleShellCmd_Bash() {
// complete -o dirnames -C 'jump hint "${COMP_LINE/#j /}" --smart' j
}
-func ExampleShellCmd_Zsh() {
+func Example_shellCmd_Zsh() {
shellCmd(cli.Args{"zsh"}, nil)
// Output:
@@ -60,7 +60,7 @@ func ExampleShellCmd_Zsh() {
// compctl -U -K jump_completion j
}
-func ExampleShellCmd_Fish() {
+func Example_shellCmd_Fish() {
shellCmd(cli.Args{"fish"}, nil)
// Output:
@@ -83,7 +83,7 @@ func ExampleShellCmd_Fish() {
// complete --command j --exclusive --arguments '(jump hint)'
}
-func ExampleShellCmd_Bind() {
+func Example_shellCmd_Bind() {
shellCmd(cli.Args{"bash", "--bind=z"}, nil)
// Output:
View
@@ -4,7 +4,7 @@ import (
"github.com/gsamokovarov/jump/cli"
)
-func ExampleVersionCmd() {
+func Example_versionCmd() {
versionCmd(cli.Args{}, nil)
// Output:

0 comments on commit 8d04948

Please sign in to comment.