diff options
| author | Nick White <git@njw.name> | 2020-09-21 13:03:17 +0100 | 
|---|---|---|
| committer | Nick White <git@njw.name> | 2020-09-21 13:03:17 +0100 | 
| commit | 4944bbf72e43243cf2bbc9fe3493cf0f920c42d8 (patch) | |
| tree | 776a2e41c7dc62a3e2e984842a0b762875bccbbf | |
| parent | 1f8e45c576c95419ae2303a8615f356749579253 (diff) | |
Use strings.Replace rather than strings.ReplaceAll so that it works on older versions of go
| -rw-r--r-- | cmd/iiifdownloader/main.go | 2 | 
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  | 
