mirror of
https://github.com/coredns/coredns.git
synced 2026-04-07 20:45:32 -04:00
lint(revive): fix early-return violations (#7974)
This commit is contained in:
@@ -69,15 +69,14 @@ func setup(c *caddy.Controller) error {
|
||||
case "upstream":
|
||||
c.RemainingArgs()
|
||||
case "credentials":
|
||||
if c.NextArg() {
|
||||
credType, err := getCredType(c.Val())
|
||||
if err != nil {
|
||||
return plugin.Error("clouddns", c.Errf("invalid credentials file %q: %v", c.Val(), err))
|
||||
}
|
||||
opt = option.WithAuthCredentialsFile(credType, c.Val())
|
||||
} else {
|
||||
if !c.NextArg() {
|
||||
return plugin.Error("clouddns", c.ArgErr())
|
||||
}
|
||||
credType, err := getCredType(c.Val())
|
||||
if err != nil {
|
||||
return plugin.Error("clouddns", c.Errf("invalid credentials file %q: %v", c.Val(), err))
|
||||
}
|
||||
opt = option.WithAuthCredentialsFile(credType, c.Val())
|
||||
case "fallthrough":
|
||||
fall.SetZonesFromArgs(c.RemainingArgs())
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user