Skip to content

Commit

Permalink
fix: non-constant format string in call to ...
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Sep 7, 2024
1 parent 7f27d9c commit a22a2c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func ResponseLogAndError(v interface{}) {
e, isErr := v.(error)
_, isRuntimeErr := e.(runtime.Error)
if isErr && !isRuntimeErr {
logrus.Errorf(fmt.Sprint(e))
logrus.Errorf("%v", e)

Check warning on line 83 in cmd/list.go

View check run for this annotation

Codecov / codecov/patch

cmd/list.go#L83

Added line #L83 was not covered by tests
fmt.Println(fmt.Sprint(e))
} else {
logrus.Errorf("Caught FATAL error: %s", v)
Expand Down
2 changes: 1 addition & 1 deletion s3/s3_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func parseAwsError(err error) error {
if reqErr, ok := err.(awserr.RequestFailure); ok {
message += fmt.Sprintln(reqErr.StatusCode(), reqErr.RequestID())
}
return fmt.Errorf(message)
return fmt.Errorf("%s", message)

Check warning on line 94 in s3/s3_service.go

View check run for this annotation

Codecov / codecov/patch

s3/s3_service.go#L94

Added line #L94 was not covered by tests
}
return err
}
Expand Down

0 comments on commit a22a2c9

Please sign in to comment.