From 4944bbf72e43243cf2bbc9fe3493cf0f920c42d8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 21 Sep 2020 13:03:17 +0100 Subject: Use strings.Replace rather than strings.ReplaceAll so that it works on older versions of go --- cmd/iiifdownloader/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/iiifdownloader/main.go b/cmd/iiifdownloader/main.go index 50858ef..a1fba4f 100644 --- a/cmd/iiifdownloader/main.go +++ b/cmd/iiifdownloader/main.go @@ -299,7 +299,7 @@ func dlNoPgNums(bookdir, pgurlStart, pgurlEnd, pgurlAltStart, pgurlAltEnd string // but enough for us for now. func sanitiseUrl(u string) string { var s string - s = strings.ReplaceAll(u, "//", "/") + s = strings.Replace(u, "//", "/", -1) s = strings.Replace(s, "https:/", "https://", 1) s = strings.Replace(s, "http:/", "http://", 1) return s -- cgit v1.2.1-24-ge1ad