strings.ReplaceAll is not in go 1.11

pull/175/head
Rob Loranger 5 years ago
parent eae4097677
commit 2a7a8298e1
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 4
      updates.go

@ -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

Loading…
Cancel
Save