refactor: cleanup

License: MIT
Signed-off-by: Henrique Dias <[email protected]>
This commit is contained in:
Henrique Dias
2019-05-12 19:00:58 +01:00
parent 24fa8aa228
commit f172f1bca1
2 changed files with 9 additions and 9 deletions
+9
View File
@@ -1,11 +1,20 @@
package webdav
import (
"regexp"
"strings"
"golang.org/x/net/webdav"
)
// Rule is a dissalow/allow rule.
type Rule struct {
Regex bool
Allow bool
Path string
Regexp *regexp.Regexp
}
// User contains the settings of each user.
type User struct {
Username string
-9
View File
@@ -4,7 +4,6 @@ import (
"context"
"log"
"net/http"
"regexp"
)
// Config is the configuration of a WebDAV instance.
@@ -84,14 +83,6 @@ func (c *Config) ServeHTTP(w http.ResponseWriter, r *http.Request) {
u.Handler.ServeHTTP(w, r)
}
// Rule is a dissalow/allow rule.
type Rule struct {
Regex bool
Allow bool
Path string
Regexp *regexp.Regexp
}
// responseWriterNoBody is a wrapper used to suprress the body of the response
// to a request. Mainly used for HEAD requests.
type responseWriterNoBody struct {