shared/cancel: Don't needlessly use format string functions

Signed-off-by: Nathan Chase <ntc477@utexas.edu>
This commit is contained in:
Nathan Chase 2025-05-23 01:30:31 -04:00 committed by Stéphane Graber
parent ed5778e5ef
commit 9ddfa4910a
No known key found for this signature in database
GPG Key ID: C638974D64792D67

View File

@ -2,7 +2,7 @@ package cancel
import (
"context"
"fmt"
"errors"
"net/http"
"sync"
)
@ -36,7 +36,7 @@ func (c *HTTPRequestCanceller) Cancelable() bool {
// Cancel will attempt to cancel all ongoing operations.
func (c *HTTPRequestCanceller) Cancel() error {
if !c.Cancelable() {
return fmt.Errorf("This operation can't be canceled at this time")
return errors.New("This operation can't be canceled at this time")
}
c.lock.Lock()