Fix error handling with Validate when loading modules (fixes #2658)

The return statement was improperly nested in context.go
This commit is contained in:
Matthew Holt
2019-07-07 14:12:22 -06:00
parent 84f9f7cd60
commit 42acdad9e5
3 changed files with 14 additions and 6 deletions

View File

@ -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)
)