Skip to content

Releases: zxdev/urlx

v1.0.7

Choose a tag to compare

@zxdev zxdev released this 26 May 17:43

allow download of resource to create a .tmp file and then rename and fix file permissions when creating a a default directory

v1.0.6

Choose a tag to compare

@zxdev zxdev released this 25 May 22:06
  • configurator is now urlx.NewURL
  • add icann.org TLD list
  • add Kind flag text decoder
  • add InvalidURL toggle

v1.0.5

Choose a tag to compare

@zxdev zxdev released this 01 May 20:04

Adjust the whitespace removal to clear whitespace from ips and domains.

v1.0.4

Choose a tag to compare

@zxdev zxdev released this 24 Apr 18:25

The adjusts the final validation check.

v1.0.3

Choose a tag to compare

@zxdev zxdev released this 24 Apr 17:35

Added validTLD with a ValidTLD() toggle method (default:on) to enforce only recognized valid old extensions in the parser.

Also clarified the Compare() method is a boolean equivalence comparison test for Apex and Host domain names. It's best to test for an IP first and take action at that branch point, however testing with an IP will report equivalence even though the apex field is empty because the intended logic is that when the Host and Apex forms are different a different or a secondary action would be taken based upon testing so plan the resultant logic flow accordingly.

v1.0.2

Choose a tag to compare

@zxdev zxdev released this 20 Apr 19:02

Adds the compare method for domains.

// Compare is a boolean comparison test for Apex and Host hostnames; the
// Apex form will always be empty on the parser failure or when an IP is
// detected so this sould only be used with domains
func (u *URL) Compare() bool {
	return len(u.Apex) > 0 && len(u.Host) == len(u.Apex)
}

v1.0.1

Choose a tag to compare

@zxdev zxdev released this 20 Apr 04:20

Auto detect OS uses /var/urlx for production and ./dat for development

if path == nil || len(*path) == 0 {
 var resource = "dat"
 if runtime.GOOS == "linux" {
  resource = "/var/urlx"
 }
 os.Mkdir(resource, 0644)
 path = &resource
}

v1.0.0

Choose a tag to compare

@zxdev zxdev released this 20 Apr 03:26

The urlx package is a simple url standardizer that parses a url into its constituant parts and will set several flags as part of the parser such as url.IP or url.IDNA flag when detected. The parser can be modified with various toggles, such as noWWW, noPort, noPage as well as various controls flags such as onlyIP, onlyApex, or onlyHost.

The Parser is used to generally confirms the hostname has the required format and generates the tld, apex, and host along with the tld kind for the domain and reports only the host for an IPv4/6 address.