Fix warning kinda Need to fix this with a regex
alex wennerberg alex@alexwennerberg.com
Thu, 04 Feb 2021 19:23:50 -0800
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
utils.go
→
utils.go
@@ -22,8 +22,8 @@ scanner := bufio.NewScanner(r)
result := []string{} for scanner.Scan() { text := scanner.Text() - // TODO use actual parser. this could be a little wonky - if strings.HasPrefix(text, "=>") && strings.Contains(text, c.Host) && (strings.Contains(text, "gemini://") || strings.Contains(text, "https://")) { + // TODO use actual parser + if strings.HasPrefix(text, "=>") && strings.Contains(text, "."+c.Host) && (strings.Contains(text, "gemini://") || strings.Contains(text, "https://")) { result = append(result, text) } }