mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
run gofmt -w -s **/*.go (#3126)
format and simplify; highlighted some stuff in route53_test.go that could be further simplified. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -43,7 +43,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort it and format it
|
// sort it and format it
|
||||||
list := []string{}
|
list := []string{}
|
||||||
for k := range o {
|
for k := range o {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ func (fakeRoute53) ListResourceRecordSetsPagesWithContext(_ aws.Context, in *rou
|
|||||||
func TestRoute53(t *testing.T) {
|
func TestRoute53(t *testing.T) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
r, err := New(ctx, fakeRoute53{}, map[string][]string{"bad.": {"0987654321"}}, time.Duration(1)*time.Minute)
|
r, err := New(ctx, fakeRoute53{}, map[string][]string{"bad.": {"0987654321"}}, time.Minute)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to create Route53: %v", err)
|
t.Fatalf("Failed to create Route53: %v", err)
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ func TestRoute53(t *testing.T) {
|
|||||||
t.Fatalf("Expected errors for zone bad.")
|
t.Fatalf("Expected errors for zone bad.")
|
||||||
}
|
}
|
||||||
|
|
||||||
r, err = New(ctx, fakeRoute53{}, map[string][]string{"org.": {"1357986420", "1234567890"}, "gov.": {"Z098765432", "1234567890"}}, time.Duration(90)*time.Second)
|
r, err = New(ctx, fakeRoute53{}, map[string][]string{"org.": {"1357986420", "1234567890"}, "gov.": {"Z098765432", "1234567890"}}, 90*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to create Route53: %v", err)
|
t.Fatalf("Failed to create Route53: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user