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
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!


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