summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/caddyhttp.go10
-rw-r--r--modules/caddyhttp/fileserver/staticfiles.go8
2 files changed, 13 insertions, 5 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go
index 7d30178..3277e42 100644
--- a/modules/caddyhttp/caddyhttp.go
+++ b/modules/caddyhttp/caddyhttp.go
@@ -102,7 +102,7 @@ func (app *App) Validate() error {
}
for _, a := range expanded {
if sn, ok := lnAddrs[netw+a]; ok {
- return fmt.Errorf("listener address repeated: %s (already claimed by server '%s')", a, sn)
+ return fmt.Errorf("server %s: listener address repeated: %s (already claimed by server '%s')", srvName, a, sn)
}
lnAddrs[netw+a] = srvName
}
@@ -486,5 +486,9 @@ const (
DefaultHTTPSPort = 443
)
-// Interface guard
-var _ caddy.App = (*App)(nil)
+// Interface guards
+var (
+ _ caddy.App = (*App)(nil)
+ _ caddy.Provisioner = (*App)(nil)
+ _ caddy.Validator = (*App)(nil)
+)
diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go
index 67a337b..0bb910d 100644
--- a/modules/caddyhttp/fileserver/staticfiles.go
+++ b/modules/caddyhttp/fileserver/staticfiles.go
@@ -450,5 +450,9 @@ var defaultIndexNames = []string{"index.html"}
const minBackoff, maxBackoff = 2, 5
-// Interface guard
-var _ caddyhttp.Handler = (*FileServer)(nil)
+// Interface guards
+var (
+ _ caddy.Provisioner = (*FileServer)(nil)
+ _ caddy.Validator = (*FileServer)(nil)
+ _ caddyhttp.Handler = (*FileServer)(nil)
+)