Skip to content

Commit

Permalink
style(truncate.go): format error messages and logging for improved re…
Browse files Browse the repository at this point in the history
…adability

The error message formatting and logging statements are adjusted for
better readability. This enhances the maintainability of the code by
making it easier to understand the structure of the log messages and
error handling.
  • Loading branch information
cybersiddhu committed Oct 4, 2024
1 parent 84eea25 commit 5066ea7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/k8s/cli/arangodb/truncate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ var TruncateCmd = &cobra.Command{
LoadCommand(database),
)
if err != nil {
return errors.Errorf("error in running job %s for database %s", err, database)
return errors.Errorf(
"error in running job %s for database %s",
err,
database,
)
}
registry.GetLogger().Infof("deployed job %s for database %s", job.Name, database)
registry.GetLogger().
Infof("deployed job %s for database %s", job.Name, database)

return nil
},
Expand All @@ -48,6 +53,5 @@ func LoadCommand(database string) []string {
"info",
"--database",
database,
"--is-secure",
}
}

0 comments on commit 5066ea7

Please sign in to comment.