Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrondier committed Nov 29, 2024
1 parent d88fec6 commit da30717
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions cmd/dbaas_user_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (c *dbaasUserCreateCmd) cmdAliases() []string { return nil }
func (c *dbaasUserCreateCmd) cmdShort() string { return "Create DBAAS user" }

func (c *dbaasUserCreateCmd) cmdLong() string {
return fmt.Sprintf(`This command creates a DBAAS user for the specified service.`)
return fmt.Sprint(`This command creates a DBAAS user for the specified service.`)

Check failure on line 36 in cmd/dbaas_user_create.go

View workflow job for this annotation

GitHub Actions / build

unnecessary use of fmt.Sprint (S1039)
}

func (c *dbaasUserCreateCmd) cmdPreRun(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -71,9 +71,10 @@ func (c *dbaasUserCreateCmd) cmdRun(cmd *cobra.Command, args []string) error {
return c.createOpensearch(cmd, args)
case "redis":
return c.createRedis(cmd, args)
default:
return fmt.Errorf("creating user unsupported for service of type %q", dbType)
}

return nil
}

func init() {
Expand Down
5 changes: 3 additions & 2 deletions cmd/dbaas_user_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *dbaasUserDeleteCmd) cmdAliases() []string { return nil }
func (c *dbaasUserDeleteCmd) cmdShort() string { return "Delete DBAAS user" }

func (c *dbaasUserDeleteCmd) cmdLong() string {
return fmt.Sprintf(`This command deletes a DBAAS user for the specified service.`)
return fmt.Sprint(`This command deletes a DBAAS user for the specified service.`)

Check failure on line 28 in cmd/dbaas_user_delete.go

View workflow job for this annotation

GitHub Actions / build

unnecessary use of fmt.Sprint (S1039)
}

func (c *dbaasUserDeleteCmd) cmdPreRun(cmd *cobra.Command, args []string) error {
Expand All @@ -52,9 +52,10 @@ func (c *dbaasUserDeleteCmd) cmdRun(cmd *cobra.Command, args []string) error {
return c.deleteOpensearch(cmd, args)
case "redis":
return c.deleteRedis(cmd, args)
default:
return fmt.Errorf("deleting user unsupported for service of type %q", dbType)
}

return nil
}

func init() {
Expand Down
5 changes: 3 additions & 2 deletions cmd/dbaas_user_reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *dbaasUserResetCmd) cmdAliases() []string { return nil }
func (c *dbaasUserResetCmd) cmdShort() string { return "Reset the credentials of a DBAAS user" }

func (c *dbaasUserResetCmd) cmdLong() string {
return fmt.Sprintf(`This command resets the credentials of a DBAAS user for the specified service.`)
return fmt.Sprint(`This command resets the credentials of a DBAAS user for the specified service.`)

Check failure on line 34 in cmd/dbaas_user_reset.go

View workflow job for this annotation

GitHub Actions / build

unnecessary use of fmt.Sprint (S1039)
}

func (c *dbaasUserResetCmd) cmdPreRun(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -68,9 +68,10 @@ func (c *dbaasUserResetCmd) cmdRun(cmd *cobra.Command, args []string) error {
return c.resetRedis(cmd, args)
case "grafana":
return c.resetGrafana(cmd, args)
default:
return fmt.Errorf("reseting user credentials unsupported for service of type %q", dbType)
}

return nil
}

func init() {
Expand Down

0 comments on commit da30717

Please sign in to comment.