mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08:00
fix format
This commit is contained in:
parent
394b9ccf41
commit
364aac5073
5 changed files with 11 additions and 15 deletions
|
@ -33,7 +33,7 @@ type PreviewArgs struct {
|
|||
GetDNSConfigArgs
|
||||
GetCredentialsArgs
|
||||
FilterArgs
|
||||
Notify bool
|
||||
Notify bool
|
||||
WarnChanges bool
|
||||
}
|
||||
|
||||
|
|
|
@ -616,8 +616,8 @@ func makeTests(t *testing.T) []*TestCase {
|
|||
)
|
||||
}
|
||||
|
||||
// test r53 for very very large batch sizes
|
||||
if *providerToRun == "ROUTE53"{
|
||||
// test r53 for very very large batch sizes
|
||||
if *providerToRun == "ROUTE53" {
|
||||
tests = append(tests,
|
||||
tc("600 records", manyA("rec%04d", "1.2.3.4", 600)...),
|
||||
tc("Update 600 records", manyA("rec%04d", "1.2.3.5", 600)...),
|
||||
|
@ -626,9 +626,9 @@ func makeTests(t *testing.T) []*TestCase {
|
|||
tc("Update 1200 records", manyA("rec%04d", "1.2.3.5", 1200)...),
|
||||
tc("Empty"),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Empty last
|
||||
tests = append(tests,tc("Empty"))
|
||||
tests = append(tests, tc("Empty"))
|
||||
return tests
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -33,7 +33,7 @@ var features = providers.DocumentationNotes{
|
|||
func newOVH(m map[string]string, metadata json.RawMessage) (*ovhProvider, error) {
|
||||
appKey, appSecretKey, consumerKey := m["app-key"], m["app-secret-key"], m["consumer-key"]
|
||||
|
||||
c,err := ovh.NewClient(ovh.OvhEU, appKey, appSecretKey, consumerKey)
|
||||
c, err := ovh.NewClient(ovh.OvhEU, appKey, appSecretKey, consumerKey)
|
||||
if c == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -270,10 +270,6 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
|||
chg.ResourceRecordSet = rrset
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
addCorrection := func(msg string, req *r53.ChangeResourceRecordSetsInput) {
|
||||
corrections = append(corrections,
|
||||
&models.Correction{
|
||||
|
@ -290,8 +286,8 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
|||
})
|
||||
}
|
||||
|
||||
getBatchSize := func(size, max int) int{
|
||||
if size > max{
|
||||
getBatchSize := func(size, max int) int {
|
||||
if size > max {
|
||||
return max
|
||||
}
|
||||
return size
|
||||
|
|
Loading…
Add table
Reference in a new issue