all: use variables for xml.Name values

This commit is contained in:
Simon Ser
2020-01-17 17:09:23 +01:00
parent 557972089c
commit 34b2ebf940
5 changed files with 20 additions and 13 deletions

View File

@@ -9,6 +9,8 @@ import (
"time"
)
const Namespace = "DAV:"
type Status struct {
Code int
Text string
@@ -265,6 +267,14 @@ type GetLastModified struct {
LastModified Time `xml:",chardata"`
}
var (
ResourceTypeName = xml.Name{"DAV:", "resourcetype"}
GetContentLengthName = xml.Name{"DAV:", "getcontentlength"}
GetContentTypeName = xml.Name{"DAV:", "getcontenttype"}
GetLastModifiedName = xml.Name{"DAV:", "getlastmodified"}
GetETagName = xml.Name{"DAV:", "getetag"}
)
// https://tools.ietf.org/html/rfc4918#section-14.5
type Error struct {
XMLName xml.Name `xml:"DAV: error"`