summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-21 14:22:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-21 14:22:21 -0600
commit2fd98cb040b617d2a018ae00a3a68b320de7dbc6 (patch)
tree91de4d369ec2a94c8f4fc3de4ba256945ad50297 /modules/caddyhttp/fileserver
parent67d32e6779b8e4f67fb0902b06210596371ead7f (diff)
Module.New() does not need to return an error
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/matcher.go2
-rw-r--r--modules/caddyhttp/fileserver/staticfiles.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go
index 29805a2..8196131 100644
--- a/modules/caddyhttp/fileserver/matcher.go
+++ b/modules/caddyhttp/fileserver/matcher.go
@@ -11,7 +11,7 @@ import (
func init() {
caddy2.RegisterModule(caddy2.Module{
Name: "http.matchers.file",
- New: func() (interface{}, error) { return new(FileMatcher), nil },
+ New: func() interface{} { return new(FileMatcher) },
})
}
diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go
index 19f5f68..c6a01ac 100644
--- a/modules/caddyhttp/fileserver/staticfiles.go
+++ b/modules/caddyhttp/fileserver/staticfiles.go
@@ -21,7 +21,7 @@ func init() {
caddy2.RegisterModule(caddy2.Module{
Name: "http.responders.file_server",
- New: func() (interface{}, error) { return new(FileServer), nil },
+ New: func() interface{} { return new(FileServer) },
})
}