Skip to content

Commit 28bfd8e

Browse files
committed
lint fix
1 parent b9c60e8 commit 28bfd8e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/cmd/repo/rename/rename.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ type RenameOptions struct {
2323
RepoName []string
2424
}
2525

26-
type renameRepo struct{
27-
Owner string
28-
Repository string
29-
Name string `json:"name,omitempty"`
26+
type renameRepo struct {
27+
Owner string
28+
Repository string
29+
Name string `json:"name,omitempty"`
3030
}
3131

3232
func NewCmdRename(f *cmdutil.Factory, runf func(*RenameOptions) error) *cobra.Command {
@@ -88,9 +88,9 @@ func renameRun(opts *RenameOptions) error {
8888
}
8989

9090
input := renameRepo{
91-
Owner: repo.RepoOwner(),
92-
Repository: repo.RepoName(),
93-
Name: newRepoName,
91+
Owner: repo.RepoOwner(),
92+
Repository: repo.RepoName(),
93+
Name: newRepoName,
9494
}
9595

9696
err = runRename(apiClient, repo.RepoHost(), repoDetails, input)
@@ -99,21 +99,21 @@ func renameRun(opts *RenameOptions) error {
9999
}
100100

101101
if opts.IO.IsStdoutTTY() {
102-
fmt.Fprintf(opts.IO.Out, "%s Renamed repository %s\n", cs.SuccessIcon(), currentUser + "/" + newRepoName)
102+
fmt.Fprintf(opts.IO.Out, "%s Renamed repository %s\n", cs.SuccessIcon(), currentUser+"/"+newRepoName)
103103
}
104104

105105
return nil
106106
}
107107

108108
func runRename(apiClient *api.Client, hostname string, repoDetails *api.Repository, input renameRepo) error {
109109
path := fmt.Sprintf("repos/%s/%s", repoDetails.Owner.Login, repoDetails.Name)
110-
110+
111111
body := &bytes.Buffer{}
112112
enc := json.NewEncoder(body)
113113
if err := enc.Encode(input); err != nil {
114114
return err
115115
}
116-
116+
117117
err := apiClient.REST(hostname, "PATCH", path, body, nil)
118118
if err != nil {
119119
return err

0 commit comments

Comments
 (0)