xattrs.go 475 B

123456789101112131415161718
  1. package system // import "github.com/docker/docker/pkg/system"
  2. type XattrError struct {
  3. Op string
  4. Attr string
  5. Path string
  6. Err error
  7. }
  8. func (e *XattrError) Error() string { return e.Op + " " + e.Attr + " " + e.Path + ": " + e.Err.Error() }
  9. func (e *XattrError) Unwrap() error { return e.Err }
  10. // Timeout reports whether this error represents a timeout.
  11. func (e *XattrError) Timeout() bool {
  12. t, ok := e.Err.(interface{ Timeout() bool })
  13. return ok && t.Timeout()
  14. }