mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
shared/cancel: Don't needlessly use format string functions
Signed-off-by: Nathan Chase <ntc477@utexas.edu>
This commit is contained in:
parent
ed5778e5ef
commit
9ddfa4910a
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user