summaryrefslogtreecommitdiff
path: root/cmd/iiifdownloader
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-09-21 13:03:17 +0100
committerNick White <git@njw.name>2020-09-21 13:03:17 +0100
commit4944bbf72e43243cf2bbc9fe3493cf0f920c42d8 (patch)
tree776a2e41c7dc62a3e2e984842a0b762875bccbbf /cmd/iiifdownloader
parent1f8e45c576c95419ae2303a8615f356749579253 (diff)
Use strings.Replace rather than strings.ReplaceAll so that it works on older versions of go
Diffstat (limited to 'cmd/iiifdownloader')
-rw-r--r--cmd/iiifdownloader/main.go2
1 files changed, 1 insertions, 1 deletions
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