Skip to content

Commit 3476d8b

Browse files
authored
refactor: deployment API & model for connection pattern & format code (#160)
2 parents c6a0b63 + 025796b commit 3476d8b

File tree

34 files changed

+88
-86
lines changed

34 files changed

+88
-86
lines changed

internal/cmd/auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func NewCmdAuth(f *cmdutil.Factory) *cobra.Command {
2222
cmd.AddCommand(authLoginCmd.NewCmdLogin(f))
2323
cmd.AddCommand(authLogoutCmd.NewCmdLogout(f))
2424
cmd.AddCommand(authStatusCmd.NewCmdStatus(f))
25-
//cmd.AddCommand(authTokenCmd.NewCmdToken(f, nil))
25+
// cmd.AddCommand(authTokenCmd.NewCmdToken(f, nil))
2626

2727
return cmd
2828
}

internal/cmd/auth/logout/logout.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import (
66
"github.com/zeabur/cli/internal/cmdutil"
77
)
88

9-
type logoutOptions struct {
10-
}
9+
type logoutOptions struct{}
1110

1211
func NewCmdLogout(f *cmdutil.Factory) *cobra.Command {
1312
opts := &logoutOptions{}

internal/cmd/context/clear/clear.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import (
66
"github.com/zeabur/cli/internal/cmdutil"
77
)
88

9-
type Options struct {
10-
}
9+
type Options struct{}
1110

1211
func NewCmdClear(f *cmdutil.Factory) *cobra.Command {
1312
opts := &Options{}

internal/cmd/context/get/get.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import (
66
"github.com/zeabur/cli/internal/cmdutil"
77
)
88

9-
type Options struct {
10-
}
9+
type Options struct{}
1110

1211
func NewCmdGet(f *cmdutil.Factory) *cobra.Command {
1312
opts := &Options{}

internal/cmd/deployment/list/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
type Options struct {
15-
//todo: support service name
15+
// todo: support service name
1616
serviceID string
1717
serviceName string
1818
environmentID string

internal/cmd/project/get/get.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package get
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/spf13/cobra"
78
"github.com/zeabur/cli/internal/util"
89

internal/cmd/project/list/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package list
22

33
import (
44
"context"
5+
56
"github.com/spf13/cobra"
67

78
"github.com/zeabur/cli/internal/cmdutil"
89
)
910

10-
type Options struct {
11-
}
11+
type Options struct{}
1212

1313
func NewCmdList(f *cmdutil.Factory) *cobra.Command {
1414
opts := Options{}

internal/cmd/service/list/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package list
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/spf13/cobra"
78
"github.com/zeabur/cli/internal/cmdutil"
89
"github.com/zeabur/cli/internal/util"

internal/cmd/template/delete/delete.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func runDelete(f *cmdutil.Factory, opts Options) error {
3535
return runDeleteInteractive(f, opts)
3636
}
3737
return runDeleteNonInteractive(f, opts)
38-
3938
}
4039

4140
func runDeleteInteractive(f *cmdutil.Factory, opts Options) error {

internal/cmd/template/get/get.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func runGet(f *cmdutil.Factory, opts Options) error {
3535
return runGetInteractive(f, opts)
3636
}
3737
return runGetNonInteractive(f, opts)
38-
3938
}
4039

4140
func runGetInteractive(f *cmdutil.Factory, opts Options) error {

0 commit comments

Comments
 (0)