Skip to content

Commit 32d3a49

Browse files
committed
fix(workflow-cli): lint error
1 parent c3cf990 commit 32d3a49

7 files changed

Lines changed: 19 additions & 21 deletions

File tree

internal/completion/completion.go

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,12 @@ func (c *LimitSetPlanCompletion) CompletionFunc(cmd *cobra.Command, args []strin
357357
}
358358
}
359359
return results, cobra.ShellCompDirectiveNoFileComp
360-
} else {
361-
ptsSetArgsCompletion := PtsSetArgsCompletion{
362-
PtsCompletion: &PtsCompletion{AppID: c.AppID, ArgsLen: -1, ConfigFile: c.ConfigFile},
363-
}
364-
return ptsSetArgsCompletion.CompletionFunc(cmd, args, toComplete)
365360
}
361+
ptsSetArgsCompletion := PtsSetArgsCompletion{
362+
PtsCompletion: &PtsCompletion{AppID: c.AppID, ArgsLen: -1, ConfigFile: c.ConfigFile},
363+
}
364+
return ptsSetArgsCompletion.CompletionFunc(cmd, args, toComplete)
365+
366366
}
367367

368368
type UserPermsCompletion struct {
@@ -435,12 +435,11 @@ func (c *PermUpdateCompletion) CompletionFunc(cmd *cobra.Command, args []string,
435435
if len(args) == 0 {
436436
permUsernameCompletion := PermUsernameCompletion{AppID: c.AppID, ArgsLen: 0, ConfigFile: c.ConfigFile}
437437
return permUsernameCompletion.CompletionFunc(cmd, args, toComplete)
438-
} else {
439-
userPermsArgsCompletion := UserPermsArgsCompletion{
440-
UserPermsCompletion: &UserPermsCompletion{ConfigFile: c.ConfigFile},
441-
}
442-
return userPermsArgsCompletion.CompletionFunc(cmd, args, toComplete)
443438
}
439+
userPermsArgsCompletion := UserPermsArgsCompletion{
440+
UserPermsCompletion: &UserPermsCompletion{ConfigFile: c.ConfigFile},
441+
}
442+
return userPermsArgsCompletion.CompletionFunc(cmd, args, toComplete)
444443
}
445444

446445
type PsCompletion struct {
@@ -823,12 +822,11 @@ func (c *VolumesMountCompletion) CompletionFunc(cmd *cobra.Command, args []strin
823822
if len(args) == 0 {
824823
volumeCompletion := VolumeCompletion{AppID: c.AppID, ArgsLen: 0, ConfigFile: c.ConfigFile}
825824
return volumeCompletion.CompletionFunc(cmd, args, toComplete)
826-
} else {
827-
ptsSetArgsCompletion := PtsSetArgsCompletion{
828-
PtsCompletion: &PtsCompletion{AppID: c.AppID, ArgsLen: -1, ConfigFile: c.ConfigFile},
829-
}
830-
return ptsSetArgsCompletion.CompletionFunc(cmd, args, toComplete)
831825
}
826+
ptsSetArgsCompletion := PtsSetArgsCompletion{
827+
PtsCompletion: &PtsCompletion{AppID: c.AppID, ArgsLen: -1, ConfigFile: c.ConfigFile},
828+
}
829+
return ptsSetArgsCompletion.CompletionFunc(cmd, args, toComplete)
832830
}
833831

834832
type VolumesUnmountCompletion struct {

internal/parser/autorollback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func NewAutorollbackCommand(cmdr *commands.DryccCmd) *cobra.Command {
1212
cmd := &cobra.Command{
1313
Use: "autorollback",
1414
Short: i18n.T("Manage autorollback if or not for application"),
15-
RunE: func(cmd *cobra.Command, args []string) error {
15+
RunE: func(_ *cobra.Command, args []string) error {
1616
return cmdr.AutorollbackInfo(app)
1717
},
1818
}

internal/parser/gateways.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func NewGatewaysCommand(cmdr *commands.DryccCmd) *cobra.Command {
1212
cmd := &cobra.Command{
1313
Use: "gateways",
1414
Short: i18n.T("Manage gateways for your applications"),
15-
RunE: func(_ *cobra.Command, args []string) error {
15+
RunE: func(_ *cobra.Command, _ []string) error {
1616
results, _ := commands.ResponseLimit(limit)
1717
return cmdr.GatewaysList(app, results)
1818
},

internal/parser/tags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func NewTagsCommand(cmdr *commands.DryccCmd) *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "tags",
1919
Short: i18n.T("Manage tags for application containers"),
20-
RunE: func(cmd *cobra.Command, args []string) error {
20+
RunE: func(_ *cobra.Command, args []string) error {
2121
return cmdr.TagsList(app, flags.ptype, version)
2222
},
2323
}

internal/parser/timeouts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func NewTimeoutsCommand(cmdr *commands.DryccCmd) *cobra.Command {
1313
cmd := &cobra.Command{
1414
Use: "timeouts",
1515
Short: i18n.T("Manage pods termination grace period"),
16-
RunE: func(_ *cobra.Command, args []string) error {
16+
RunE: func(_ *cobra.Command, _ []string) error {
1717
return cmdr.TimeoutsList(app, version)
1818
},
1919
}

internal/parser/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func NewTLSCommand(cmdr *commands.DryccCmd) *cobra.Command {
1515
cmd := &cobra.Command{
1616
Use: "tls",
1717
Short: i18n.T("Manage TLS/SSL settings for applications"),
18-
RunE: func(cmd *cobra.Command, args []string) error {
18+
RunE: func(_ *cobra.Command, args []string) error {
1919
return cmdr.TLSInfo(app)
2020
},
2121
}

internal/parser/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func NewVersionCommand(cmdr *commands.DryccCmd) *cobra.Command {
1515
Use: "version",
1616
Short: i18n.T("Display client version"),
1717
Long: i18n.T("Displays the client version"),
18-
Run: func(_ *cobra.Command, args []string) {
18+
Run: func(_ *cobra.Command, _ []string) {
1919
cmdr.Version(flags.all)
2020
},
2121
}

0 commit comments

Comments
 (0)