mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 09:57:45 +08:00
26 lines
667 B
Go
26 lines
667 B
Go
package aws
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// TODO remove replace with smithy.CanceledError
|
|
|
|
// RequestCanceledError is the error that will be returned by an API request
|
|
// that was canceled. Requests given a Context may return this error when
|
|
// canceled.
|
|
type RequestCanceledError struct {
|
|
Err error
|
|
}
|
|
|
|
// CanceledError returns true to satisfy interfaces checking for canceled errors.
|
|
func (*RequestCanceledError) CanceledError() bool { return true }
|
|
|
|
// Unwrap returns the underlying error, if there was one.
|
|
func (e *RequestCanceledError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
func (e *RequestCanceledError) Error() string {
|
|
return fmt.Sprintf("request canceled, %v", e.Err)
|
|
}
|