• Steven Allen's avatar
    feat: make not-found errors discoverable · 473787bf
    Steven Allen authored
    Now we just need a common place to put:
    
    func IsNotFound(e error) bool {
      for e != nil {
        if ne, ok := e.(interface { NotFound() bool }); ok {
          return ne.NotFound()
        }
        if ue, ok := e.(interface { Unwrap() error }); ok {
          e = ue.Unwrap()
        } else {
          return false
        }
      }
      return false
    }
    473787bf
mount.go 7.87 KB