Skip to content

Commit

Permalink
gcs: use the + for concatenattion in Error()
Browse files Browse the repository at this point in the history
Don't use fmt.Sprintf when you're just concatenating two strings.
  • Loading branch information
dfinkel committed Mar 25, 2022
1 parent 00a4da4 commit 5b94267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcs/decider.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ type failedAcquisitionErr struct {
}

func (f *failedAcquisitionErr) Error() string {
return fmt.Sprintf("failed to acquire lock: %s", f.err)
return "failed to acquire lock: " + f.err.Error()
}

func (f *failedAcquisitionErr) Unwrap() error {
Expand Down

0 comments on commit 5b94267

Please sign in to comment.