4 ms·
I don't know Go's flavor of regex but is this correct parsing code: https://github.com/outcoldman/hackernews-personal-blogs/blob/master/main.go#L130-L148 https:
by distcs 3y ago
I don't know Go's flavor of regex but is this correct parsing code: https://github.com/outcoldman/hackernews-personal-blogs/blob/master/main.go#L130-L148 https://github.com/outcoldman/hackernews-personal-blogs/blob...
Are you taking care that if the <link> tag spans over multiple lines (linebreaks in between), you're still parsing it right?
You do seem to be resolving relative paths with:
feedUrl := matches[1]
if feedUrl[0] == '/' {
feedUrl = url + feedUrl
} else if !strings.HasPrefix(feedUrl, "http") {
feedUrl = url + "/" + feedUrl
}
So I think this is good. Just trying to see what could be breaking for the other users who are complaining their feed isn't listed.
- outcoldman 3y agoI have fixed it for more people, should have used the built-in resolution func https://github.com/outcoldman/hackernews-personal-blogs/blob/master/main.go#L156 https://github.com/outcoldman/hackernews-personal-blogs/blob...