From 4160e34fb65ceaafa9e163bb07308a6bf4560382 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Dec 2020 10:17:22 +0800 Subject: [PATCH] fix modPrefix (#596) Co-authored-by: ryan --- tool/kratos-gen-project/new.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/kratos-gen-project/new.go b/tool/kratos-gen-project/new.go index cbe3280ba..c62349866 100644 --- a/tool/kratos-gen-project/new.go +++ b/tool/kratos-gen-project/new.go @@ -26,7 +26,7 @@ func runNew(ctx *cli.Context) (err error) { pwd, _ := os.Getwd() p.path = filepath.Join(pwd, p.Name) } - p.ModPrefix = modPath(p.path) + p.ModPrefix = strings.ReplaceAll(modPath(p.path), "\\", "/") // creata a project if err := create(); err != nil { return err