(name, record string)
| 421 | } |
| 422 | |
| 423 | func hasRecord(name, record string) bool { |
| 424 | r53 := getService() |
| 425 | zone := domainZone(name) |
| 426 | ctx := context.Background() |
| 427 | rrsets, err := cli53.ListAllRecordSets(ctx, r53, *zone.Id) |
| 428 | fatalIfErr(err) |
| 429 | |
| 430 | for _, rrset := range rrsets { |
| 431 | rrs := cli53.ConvertRRSetToBind(rrset) |
| 432 | cli53.UnexpandSelfAliases(rrs, zone, false) |
| 433 | for _, rr := range rrs { |
| 434 | line := rr.String() |
| 435 | line = strings.Replace(line, "\t", " ", -1) |
| 436 | if record == line { |
| 437 | return true |
| 438 | } |
| 439 | } |
| 440 | } |
| 441 | return false |
| 442 | } |
| 443 | |
| 444 | func prepareZoneFile(b []byte, includeAuth bool) map[string]bool { |
| 445 | s := string(b) |
no test coverage detected