13 lines
210 B
Go
13 lines
210 B
Go
package extractor
|
|
|
|
import "strings"
|
|
|
|
func ExtractTld(domain string) string {
|
|
elements := strings.Split(domain, ".")
|
|
|
|
if len(elements) == 1 {
|
|
return elements[0]
|
|
}
|
|
|
|
return strings.Join(elements[1:], ".")
|
|
}
|