Skip to content

Commit 3001afd

Browse files
committed
full lint fix
1 parent 28bfd8e commit 3001afd

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

pkg/cmd/repo/rename/rename_test.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package rename
2+
3+
import (
4+
"testing"
5+
)
6+
7+
func TestNewCmdRename(t * testing.T) {
8+
tests := []struct {
9+
name string
10+
tty bool
11+
input string
12+
output RenameOptions
13+
wantErr bool
14+
errMsg string
15+
}{
16+
{
17+
name: "no argument",
18+
tty: true,
19+
input: "",
20+
output: RenameOptions{},
21+
},
22+
{
23+
name: "argument",
24+
tty: true,
25+
input: "cli/cli",
26+
output: RenameOptions{
27+
DestArg: "cli comand-line-interface",
28+
},
29+
},
30+
{
31+
name: "incorrect argument",
32+
tty: true,
33+
input: "",
34+
output: RenameOptions{
35+
DestArg: "cli ",
36+
},
37+
},
38+
}
39+
}
40+

pkg/cmd/repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
repoForkCmd "github.com/cli/cli/v2/pkg/cmd/repo/fork"
99
gardenCmd "github.com/cli/cli/v2/pkg/cmd/repo/garden"
1010
repoListCmd "github.com/cli/cli/v2/pkg/cmd/repo/list"
11+
repoRenameCmd "github.com/cli/cli/v2/pkg/cmd/repo/rename"
1112
repoSyncCmd "github.com/cli/cli/v2/pkg/cmd/repo/sync"
1213
repoViewCmd "github.com/cli/cli/v2/pkg/cmd/repo/view"
13-
repoRenameCmd "github.com/cli/cli/v2/pkg/cmd/repo/rename"
1414
"github.com/cli/cli/v2/pkg/cmdutil"
1515
"github.com/spf13/cobra"
1616
)

0 commit comments

Comments
 (0)