Skip to content

Releases: elliotwutingfeng/go-fasttld

v0.4.4

18 Mar 03:52
c8a6a44
Compare
Choose a tag to compare

What's Changed

Enhancements

  • Add input validation for makeASCIISet
  • Refactored some variable names for better clarity

Bug fixes

  • Fix CI version tag check
  • Fix erroneous package description from fallback.go
  • Fix endIdx out of bounds for trimLeft
  • Fix generated PSL format

Tests

  • Add test for invalid Public Suffix List content

Documentation

  • Move Go license to CREDITS.md

Full Changelog: v0.4.3...v0.4.4

v0.4.3

22 Dec 18:01
4f76569
Compare
Choose a tag to compare

What's Changed

Bug fixes

  • Use OS temporary folder instead of module folder for local cache.

Full Changelog: v0.4.2...v0.4.3

v0.4.2

22 Dec 14:24
6f30a9c
Compare
Choose a tag to compare

What's Changed

Enhancements

  • Switch to faster hashmap
  • Percentage encoded hostnames are now supported
  • go-fasttld now works in airgapped environments without either Internet and/or filesystem access.
    • By default, go-fasttld will attempt to fetch the latest public suffix list from the Internet and cache it locally to filesystem.
    • If that fails, go-fasttld will attempt to load the public suffix list from local cache.
    • If the local cache is inaccessible, as a final fallback measure, go-fasttld will load a hardcoded public suffix list.

Bug fixes

  • Tests now work on CPUs that do not support race detection
  • The more accurate term "eTLD" is now used instead of "TLD"

Housekeeping

  • Added tests for IPv4/IPv6 edge cases

Full Changelog: v0.4.1...v0.4.2

v0.4.1

24 Jul 14:25
Compare
Choose a tag to compare

What's Changed

New Features

  • PrintRes now prints subcomponents irrespective of parsing error.

Bug fixes

  • Lone TLDs with a single trailing dot are now accepted (IETF RFC 1034).

Housekeeping

  • Some unnecessarily exposed variables are now private
  • tlde module removed from benchmarks (it is almost the same as github.com/joeguo/tldextract)

Full Changelog: v0.4.0...v0.4.1

v0.4.0

20 Jul 15:33
Compare
Choose a tag to compare

What's Changed

New Features

  • New HostType field in ExtractResult{} indicates whether parsed URL is a hostname, IPv4 address, IPv6 address, or none of them.

Enhancements

  • Breaking Change: Extract() now returns ExtractResult{} as a struct instead of struct pointer.
  • Average execution time reduced by 30% due to elimination of heap allocations.
  • Some struct fields rearranged to reduce structure size.

Full Changelog: v0.3.0...v0.4.0

v0.3.0

17 Jul 19:04
Compare
Choose a tag to compare

What's Changed

Bug fixes

  • Builds are now tested to be compatible with Windows, macOS and Linux. go bench commands on previous versions did not work with Windows due to a PowerShell bug.

New Features

  • Breaking Change: Extract() now returns a second variable, error, which provides a relevant error message if URL is invalid. Otherwise, error will be nil. If the URL is invalid, partially extracted subcomponents can still be retrieved from the first variable, *ExtractResult.
  • You can now try go-fasttld on the CLI! 🖥️

Enhancements

  • Replace binary search with faster intset for invalid character detection.
  • Average execution time reduced by 15%.
  • Makefile included for easy testing & benchmarking.
  • Improved readme clarity.

Full Changelog: v0.2.2...v0.3.0

v0.2.2

02 Jul 23:27
Compare
Choose a tag to compare

What's Changed

Bug Fixes

  • URLs with null characters are now rejected.
  • Handle consecutive label separators.
  • Handle consecutive dashes when converting to punycode.
  • Handle non-ASCII alphabets.

Enhancements

  • Replaced slower regex for parsing URL Scheme with faster method of linear complexity.
  • Replace linear search with binary search for whitespace detection.
  • Average execution time reduced by 50%.
  • Average memory usage reduced by 10%.
  • Refactored IPv4 & IPv6 detection for clarity.

Full Changelog: v0.2.1...v0.2.2

v0.2.1

02 Jun 21:09
Compare
Choose a tag to compare

What's Changed

Bug Fixes

  • Reject IPv4 addresses erroneously encapsulated in square brackets.
  • Reject erroneous opening square brackets.
  • Accept whitespace in UserInfo.
  • Accept multiple @ in UserInfo.
  • Accept square brackets in Path.

Enhancements

  • Remove redundant bytes allocations when parsing IP addresses.

Full Changelog: v0.2.0...v0.2.1

v0.2.0

30 May 18:55
Compare
Choose a tag to compare

What's Changed

Enhancements

  • Support internationalised period delimiters in IPv4 addresses
  • Support IPv6 addresses
  • Add test cases from net
  • General speed improvements
  • Better compliance with IETF RFC 2396 and IETF RFC 3986

Bug Fixes

  • UserInfo parsed incorrectly if @ appears in Path

Breaking Changes

  • Trailing periods are no longer trimmed
  • First character of Path is now included (e.g. in example.com/this/is/a/path, the Path will be extracted as /this/is/a/path instead of this/is/a/path)
  • Multiple consecutive forward slashes and backslashes are now accepted
  • URL is deemed invalid if whitespaces appear before Path
  • URL is deemed invalid if backslashes appear in UserInfo

Full Changelog: v0.1.3...v0.2.0

v0.1.3

02 May 02:47
Compare
Choose a tag to compare

What's Changed

  • go-fasttld is now in Awesome Go! 🎉
  • Enhancement: Refactored test case suite (removed redundant tests)
  • Fixed: Wildcard Suffix exception rules should be obeyed
  • Fixed: Path should not be modified when converting URL to punycode
  • Fixed: SubDomain or Domain with invalid punycode should be rejected
  • Fixed: SubDomain and/or Domain should be parsed even if Suffix is missing

Full Changelog: v0.1.2...v0.1.3