From 0eb1efdaba960cd367b5346783c8f06c1986accc Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 5 Jun 2019 03:55:27 -0400 Subject: [PATCH] stick with go 1.11 compat for now --- hoot.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hoot.go b/hoot.go index eb0fc26..549d5e8 100644 --- a/hoot.go +++ b/hoot.go @@ -21,7 +21,7 @@ func hootfixer(hoot string) string { if url[0] == ' ' { url = url[1:] } - url = strings.ReplaceAll(url, "mobile.twitter.com", "twitter.com") + url = strings.Replace(url, "mobile.twitter.com", "twitter.com", -1) log.Printf("hooterizing %s", url) req, err := http.NewRequest("GET", url, nil) if err != nil { @@ -72,8 +72,8 @@ func hootfixer(hoot string) string { continue } text := htfilter.TextOnly(div) - text = strings.ReplaceAll(text, "\n", " ") - text = strings.ReplaceAll(text, "pic.twitter.com", "https://pic.twitter.com") + text = strings.Replace(text, "\n", " ", -1) + text = strings.Replace(text, "pic.twitter.com", "https://pic.twitter.com", -1) fmt.Fprintf(&buf, "> @%s: %s\n", author, text) }