From 83614f1089ad26b7818f6b2e6bc1c6382e5a2d35 Mon Sep 17 00:00:00 2001 From: kataras Date: Sat, 19 Aug 2017 22:54:13 +0300 Subject: [PATCH] update recursively when new version is available This would take more but it's safer approach for common usage. Former-commit-id: 87e11d9ea6dbb0df438e91fb478ca08e1a631d31 --- mvc/controller_test.go | 4 ++-- version.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mvc/controller_test.go b/mvc/controller_test.go index 58473b72..45511ec2 100644 --- a/mvc/controller_test.go +++ b/mvc/controller_test.go @@ -290,7 +290,7 @@ type ( ) func writeRelatives(c mvc.Controller) { - c.Ctx.JSON(iris.Map{ + c.Ctx.JSON(context.Map{ "RelPath": c.RelPath(), "TmplPath": c.RelTmpl(), }) @@ -309,7 +309,7 @@ func (c *UserProfilePostController) Get() { func TestControllerRelPathAndRelTmpl(t *testing.T) { app := iris.New() - var tests = map[string]iris.Map{ + var tests = map[string]context.Map{ // UserController "/user": {"RelPath": "/", "TmplPath": "user/"}, "/user/42": {"RelPath": "/42", "TmplPath": "user/"}, diff --git a/version.go b/version.go index 6c73fd61..f645a82a 100644 --- a/version.go +++ b/version.go @@ -99,13 +99,13 @@ func checkVersion() { } if shouldUpdate { - repo := "github.com/kataras/iris" - cmd := exec.Command("go", "get", "-u", "-f", "-v", repo) + repo := "github.com/kataras/iris/..." + cmd := exec.Command("go", "get", "-u", "-v", repo) cmd.Stdout = os.Stdout cmd.Stderr = os.Stdout if err := cmd.Run(); err != nil { - 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) + 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 -u github.com/kataras/iris/...` manually\n%v", err) return }