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

feat: Add support for .cz and .me domain expiration #24

Merged
merged 12 commits into from
Feb 14, 2025

Conversation

Listat90
Copy link
Contributor

@Listat90 Listat90 commented Feb 6, 2025

Summary

Add support for .cz and .me domain expiration

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

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

@Listat90 Can you add tests? It should be fairly straightforward:

whois/whois_test.go

Lines 26 to 33 in 185ccad

{
domain: "name.sh",
wantErr: false,
},
{
domain: "name.io",
wantErr: false,
},

@Listat90
Copy link
Contributor Author

Listat90 commented Feb 7, 2025

I noticed that I added default values when there is no domain status or name server

But it doesn't seem correct to add default values. In the case of .cz domains, the WHOIS response doesn't return a domain status. How should we handle this? The test expects at least one status, and we're getting a failure when it's missing.

What would be the best approach for this?

Thanks!

@TwiN TwiN changed the title Added support for .CZ and .ME domain expiration parsing feat: Add support for .cz and .me domain expiration Feb 10, 2025
Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

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

     --- FAIL: TestClient/name.cz_Query (0.52s)
        whois_test.go:120: expected name.cz in output, got Your connection limit exceeded. Please slow down and try again later.
    --- FAIL: TestClient/name.cz_QueryAndParse (0.34s)
        whois_test.go:136: expected to have a valid expiry date, got -62135596800 for domain name.cz
        whois_test.go:139: expected to have at least one name server for domain name.cz
        whois_test.go:145: Skipping domain status check for .cz: name.cz

🤔

@Listat90
Copy link
Contributor Author

Fix: Added support for .cz TLD, updated expiration date handling, and removed .me from tldWithoutExpirationDate

  • Added case for .cz TLD to handle expiration date parsing with custom format (dd.MM.yyyy).
  • Updated the test to exclude .cz from the "Domain Status" check.
  • Removed .me from the list of TLDs that are exempt from expiration date checks.
  • This ensures proper handling of expiration dates for .cz domains and correct checks for .me.

Copy link
Contributor Author

@Listat90 Listat90 Feb 13, 2025

Choose a reason for hiding this comment

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

Removed .me from the list of TLDs that are exempt from expiration date checks.
Added case for .cz TLD to handle expiration date parsing with custom format (dd.MM.yyyy).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added case for .cz and .me.
Added exception for domain cz

@TwiN TwiN merged commit 87801df into TwiN:master Feb 14, 2025
1 check 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