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

perf: domain status use original case #85

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

soxft
Copy link
Contributor

@soxft soxft commented Sep 1, 2024

whois-parser/util.go

Lines 72 to 82 in c102b4e

func fixDomainStatus(status []string) []string {
for k, v := range status {
names := strings.Split(strings.TrimSpace(v), " ")
status[k] = strings.ToLower(names[0])
if status[k] == "not" && len(names) > 1 && strings.ToLower(names[1]) == "delegated" {
status[k] = "not delegated"
}
}
return status
}

In the fixDomainStatus, all domain status is forcibly converted to lowercase to compare whether it is not delegated. I think domain status should be in the original case state. Users can convert case as they wish through strings.ToLower

@likexian
Copy link
Owner

likexian commented Sep 2, 2024

Hello @soxft
Thanks for your works!

@likexian likexian merged commit 4548ff7 into likexian:master Sep 2, 2024
5 checks passed
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