Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseBaseCname Error #66

Closed
qbzysa opened this issue Nov 9, 2021 · 1 comment
Closed

parseBaseCname Error #66

qbzysa opened this issue Nov 9, 2021 · 1 comment
Assignees

Comments

@qbzysa
Copy link

qbzysa commented Nov 9, 2021

parseBaseCname() may be error. eg:www.ucloud.cn.ucloud.com.cn

func parseBaseCname(url string) (string, error) {
extract, err := tldextract.New(TldCachePath, false)
if err != nil {
return "", err
}
res := extract.Extract(url)
rootDomain := res.Root + "." + res.Tld
return rootDomain, nil
}

@zu1k zu1k self-assigned this Dec 6, 2021
zu1k pushed a commit that referenced this issue Dec 16, 2021
Signed-off-by: zu1k <i@lgf.im>
@zu1k
Copy link
Owner

zu1k commented Dec 16, 2021

感谢反馈,不过我认为tldextract不太符合我们的需求,并且需要引入额外的库,我使用其他方法解决了,请查看最新提交

@zu1k zu1k closed this as completed Dec 16, 2021
zu1k pushed a commit that referenced this issue Jul 21, 2022
Signed-off-by: zu1k <i@lgf.im>
zu1k pushed a commit that referenced this issue Jul 21, 2022
Signed-off-by: zu1k <i@lgf.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants