mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
chore: enable early-return and superfluous-else from revive (#7129)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -118,11 +118,10 @@ func autoParse(c *caddy.Controller) (Auto, error) {
|
||||
}
|
||||
_, err := os.Stat(a.directory)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
log.Warningf("Directory does not exist: %s", a.directory)
|
||||
} else {
|
||||
if !os.IsNotExist(err) {
|
||||
return a, c.Errf("Unable to access root path '%s': %v", a.directory, err)
|
||||
}
|
||||
log.Warningf("Directory does not exist: %s", a.directory)
|
||||
}
|
||||
|
||||
// regexp template
|
||||
|
||||
Reference in New Issue
Block a user