Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tldify.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type URL struct {
// along with additional details like Subdomain, Domain, TLD, Port, and ICANN status.
func Parse(s string) (*URL, error) {

if !strings.HasPrefix(s, "http://") || !strings.HasPrefix(s, "https://"){
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://"){
s = fmt.Sprintf("http://%s", s)
}

Expand Down