1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 12:31:58 +00:00

Prev Commit: Update to 8.2.3 | Read HISTORY.md | Now: Improve version checker's messages

Former-commit-id: 2d773e9ef04ce4595167eb57784fc9113aeccab0
This commit is contained in:
kataras
2017-08-10 21:34:05 +03:00
parent bf929aa557
commit 85cfaa2874
3 changed files with 10 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ type versionInfo struct {
}
func checkVersion() {
client := netutil.Client(time.Duration(15 * time.Second))
client := netutil.Client(time.Duration(20 * time.Second))
r, err := client.PostForm(versionURL, url.Values{"current_version": {Version}})
if err != nil {
@@ -66,7 +66,7 @@ func checkVersion() {
return
}
format := "A more recent version has been found[%s > %s].\n"
format := "A new version is available online[%s > %s].\n"
if v.ChangelogURL != "" {
format += "Release notes: %s\n"
@@ -107,7 +107,7 @@ func checkVersion() {
cmd.Stderr = os.Stdout
if err := cmd.Run(); err != nil {
golog.Warnf("unexpected message while trying to go get: %v", err)
golog.Warnf("unexpected message while trying to go get,\nif you edited the original source code then you've to remove the whole $GOPATH/src/github.com/kataras folder and execute `go get github.com/kataras/iris` manually\n%v", err)
return
}