From a835fe6388e9182a4bff5bf588be13756947be12 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 21 Nov 2019 08:04:59 -0800 Subject: [PATCH] Change var names --- command/checkForUpdate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/command/checkForUpdate.go b/command/checkForUpdate.go index d499cb8d4..9a6a101c4 100644 --- a/command/checkForUpdate.go +++ b/command/checkForUpdate.go @@ -30,7 +30,7 @@ func CheckForUpdate(handleUpdate chan func()) { fmt.Printf(utils.Cyan(` A new version of gh is available! %s → %s Changelog: https://github.com/%s/releases/tag/%[2]s -Run 'brew upgrade github/gh/gh' to update!`)+"\n\n", Version, latestVersion, nwo) +Run 'brew reinstall gh' to update!`)+"\n\n", Version, latestVersion, nwo) } } else { handleUpdate <- nil @@ -50,10 +50,10 @@ func getLastestVersion() (string, error) { return "", err } - var j struct { + var parsedData struct { LatestVersion string `json:"tag_name"` } - json.Unmarshal(data, &j) - return j.LatestVersion, nil + json.Unmarshal(data, &parsedData) + return parsedData.LatestVersion, nil }