Skip to content

Add more web domains #5#8

Merged
UltiRequiem merged 1 commit intobobadilla-tech:mainfrom
Antoineio:feat/more-domains
Mar 13, 2025
Merged

Add more web domains #5#8
UltiRequiem merged 1 commit intobobadilla-tech:mainfrom
Antoineio:feat/more-domains

Conversation

@Antoineio
Copy link
Collaborator

Hello 👋,

I am opening this PR to resolve #5

I moved TLDs to a separate file (tlds.go) for better maintainability
This refactor allowed me to update the Domain() function to use the extracted TLDS list dynamically instead of hardcoded values

I also updated the TestDomain() function to also use the TLDS list

Finally, i added a new test, TestTLDsLength(), to validate TLD lengths
I added this test because, while researching the most commonly used TLDs, i came across RFC 1035, which states that a label must be a maximum of 63 characters. While adhering to this standard is not mandatory, but i believe it's a good practice 🤷‍♂️

Let me know if any adjustments are needed. 🙏

@UltiRequiem
Copy link
Member

LGTM

@UltiRequiem
Copy link
Member

I didn't know about RFC 1035, a link with more info could be added to the code as a comment, feel free to direct commit that change. Thanks again!

@UltiRequiem UltiRequiem merged commit 4cb6f40 into bobadilla-tech:main Mar 13, 2025
4 checks passed
Copy link
Member

@UltiRequiem UltiRequiem left a comment

Choose a reason for hiding this comment

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

💯

@Antoineio
Copy link
Collaborator Author

I didn't know about RFC 1035, a link with more info could be added to the code as a comment, feel free to direct commit that change. Thanks again!

Done in a7eef5c 👍

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.

Add more web domains

2 participants