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

@ -33,7 +33,7 @@ type PreviewArgs struct {
GetDNSConfigArgs GetDNSConfigArgs
GetCredentialsArgs GetCredentialsArgs
FilterArgs FilterArgs
Notify bool Notify bool
WarnChanges bool WarnChanges bool
} }

View file

@ -616,8 +616,8 @@ func makeTests(t *testing.T) []*TestCase {
) )
} }
// test r53 for very very large batch sizes // test r53 for very very large batch sizes
if *providerToRun == "ROUTE53"{ if *providerToRun == "ROUTE53" {
tests = append(tests, tests = append(tests,
tc("600 records", manyA("rec%04d", "1.2.3.4", 600)...), tc("600 records", manyA("rec%04d", "1.2.3.4", 600)...),
tc("Update 600 records", manyA("rec%04d", "1.2.3.5", 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("Update 1200 records", manyA("rec%04d", "1.2.3.5", 1200)...),
tc("Empty"), tc("Empty"),
) )
} }
// Empty last // Empty last
tests = append(tests,tc("Empty")) tests = append(tests, tc("Empty"))
return tests return tests
} }

View file

@ -282,7 +282,7 @@ func (c *CloudflareApi) preprocessConfig(dc *models.DomainConfig) error {
// Check UniversalSSL setting // Check UniversalSSL setting
if u := dc.Metadata[metaUniversalSSL]; u != "" { if u := dc.Metadata[metaUniversalSSL]; u != "" {
u = strings.ToLower(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) 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{} rec.Metadata = map[string]string{}
} }
// cloudflare uses "1" to mean "auto-ttl" // 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. // use automatic mode instead.
if rec.TTL == 0 || rec.TTL == 300{ if rec.TTL == 0 || rec.TTL == 300 {
rec.TTL = 1 rec.TTL = 1
} }
if rec.TTL != 1 && rec.TTL < 120 { if rec.TTL != 1 && rec.TTL < 120 {

View file

@ -33,7 +33,7 @@ var features = providers.DocumentationNotes{
func newOVH(m map[string]string, metadata json.RawMessage) (*ovhProvider, error) { func newOVH(m map[string]string, metadata json.RawMessage) (*ovhProvider, error) {
appKey, appSecretKey, consumerKey := m["app-key"], m["app-secret-key"], m["consumer-key"] 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 { if c == nil {
return nil, err return nil, err
} }

View file

@ -270,10 +270,6 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
chg.ResourceRecordSet = rrset chg.ResourceRecordSet = rrset
} }
addCorrection := func(msg string, req *r53.ChangeResourceRecordSetsInput) { addCorrection := func(msg string, req *r53.ChangeResourceRecordSetsInput) {
corrections = append(corrections, corrections = append(corrections,
&models.Correction{ &models.Correction{
@ -290,8 +286,8 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
}) })
} }
getBatchSize := func(size, max int) int{ getBatchSize := func(size, max int) int {
if size > max{ if size > max {
return max return max
} }
return size return size