lint(revive): fix early-return violations (#7974)

This commit is contained in:
Ville Vesilehto
2026-03-30 02:59:22 +03:00
committed by GitHub
parent ff954b12b2
commit 54b06d9a3b
5 changed files with 69 additions and 72 deletions

View File

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