internal: drop Multistatus.Get
This is now unused.
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -101,21 +100,6 @@ func NewMultistatus(resps ...Response) *Multistatus {
|
||||
return &Multistatus{Responses: resps}
|
||||
}
|
||||
|
||||
func (ms *Multistatus) Get(p string) (*Response, error) {
|
||||
// Clean the path to avoid issues with trailing slashes
|
||||
p = path.Clean(p)
|
||||
for i := range ms.Responses {
|
||||
resp := &ms.Responses[i]
|
||||
for _, h := range resp.Hrefs {
|
||||
if path.Clean(h.Path) == p {
|
||||
return resp, resp.Err()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("webdav: missing response for path %q", p)
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc4918#section-14.24
|
||||
type Response struct {
|
||||
XMLName xml.Name `xml:"DAV: response"`
|
||||
|
Reference in New Issue
Block a user