1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

fix format

This commit is contained in:
Craig Peterson
2019-06-27 01:21:23 -04:00
parent 394b9ccf41
commit 364aac5073
5 changed files with 11 additions and 15 deletions

View File

@@ -282,7 +282,7 @@ func (c *CloudflareApi) preprocessConfig(dc *models.DomainConfig) error {
// Check UniversalSSL setting
if u := dc.Metadata[metaUniversalSSL]; u != "" {
u = strings.ToLower(u)
if (u != "on" && u != "off") {
if u != "on" && u != "off" {
return errors.Errorf("Bad metadata value for %s: '%s'. Use on/off.", metaUniversalSSL, u)
}
}
@@ -298,9 +298,9 @@ func (c *CloudflareApi) preprocessConfig(dc *models.DomainConfig) error {
rec.Metadata = map[string]string{}
}
// cloudflare uses "1" to mean "auto-ttl"
// if we get here and ttl is not specified (or is the dnscontrol default of 300),
// if we get here and ttl is not specified (or is the dnscontrol default of 300),
// use automatic mode instead.
if rec.TTL == 0 || rec.TTL == 300{
if rec.TTL == 0 || rec.TTL == 300 {
rec.TTL = 1
}
if rec.TTL != 1 && rec.TTL < 120 {