strings.ReplaceAll is not in go 1.11

This commit is contained in:
Rob Loranger 2019-08-29 16:20:41 -07:00
parent eae4097677
commit 2a7a8298e1
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ func (uc updatesCache) LatestVersion() string {
func (uc updatesCache) ReleaseURL() string {
ver := strings.TrimPrefix(uc.latestVersion, "v")
ver = strings.TrimSuffix(ver, ".0")
return "https://blog.writefreely.org/version-" + strings.ReplaceAll(ver, ".", "-")
// hack until go 1.12 in build/travis
seg := strings.Split(ver, ".")
return "https://blog.writefreely.org/version-" + strings.Join(seg, "-")
}
// newUpdatesCache returns an initialized updates cache