-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
This library does not properly parse wildcards, it seems:
Using the following code:
package main
import (
"github.com/joeguo/tldextract"
"fmt"
)
func main() {
var test string
var err error
tld, _:= tldextract.New("/tmp/tldcache.txt",false)
for err == nil {
fmt.Printf("string: ")
fmt.Scanf("%s\n", &test)
result := tld.Extract(test)
if result.Flag == tldextract.Malformed {
fmt.Println("Error", result)
} else {
fmt.Printf("%s.%s\n", result.Root, result.Tld)
}
}
}I get:
string: http://foo.bar.com
bar.com
string: http://foo.co.uk
Error &{0 }
string: http://foo.*.uk
foo.*.uk
The "foo.*.uk" is most certainly incorrect.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels