From 354ef35f16ec8d518bf1cc3239fc2e50cc5e886f Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 26 Jun 2013 10:49:59 +0800 Subject: [PATCH] fix windows createapp --- createapp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createapp.go b/createapp.go index 9f933c6..38a123e 100644 --- a/createapp.go +++ b/createapp.go @@ -113,7 +113,7 @@ func createapp(cmd *Command, args []string) { writetofile(path.Join(apppath, "views", "index.tpl"), indextpl) fmt.Println("create main.go:", path.Join(apppath, "main.go")) - writetofile(path.Join(apppath, "main.go"), strings.Replace(maingo, "{{.Appname}}", strings.TrimPrefix(appsrcpath, "/"), -1)) + writetofile(path.Join(apppath, "main.go"), strings.Replace(maingo, "{{.Appname}}", strings.TrimPrefix(strings.Replace(appsrcpath, "\\", "/", -1), "/"), -1)) } var appconf = `