Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Fixed resources with upper case names not destroyed #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants