Skip to content

Conversation

PetrusHahol
Copy link

Solves #82

@PetrusHahol PetrusHahol changed the title Fixed resources with upper case names not destroyed Bugfix: Fixed resources with upper case names not destroyed Jun 21, 2021
@@ -522,7 +522,7 @@ func (client *Client) ListRecordsInRRSet(zone string, name string, tpe string) (

records := make([]Record, 0, 10)
for _, r := range allRecords {
if r.Name == name && r.Type == tpe {
if r.Name == strings.ToLower(name) && r.Type == tpe {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's use there strings.EqualFold as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree. Nice catch, thank you!

@@ -547,7 +547,7 @@ func (client *Client) RecordExists(zone string, name string, tpe string) (bool,
}

for _, record := range allRecords {
if record.Name == name && record.Type == tpe {
if record.Name == strings.ToLower(name) && record.Type == tpe {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants