-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened:
在以前使用类似如下命令,是可以把传递的路径作为 go mod
kratos new github.com/demo/demo2 -r github.com/layout/layout.git
- 以前新生成的项目,
go mod
为github.com/demo/demo2
- 现在不会了,目前无法设置
go mod
,只是把传递的目录最后一个文件夹名称作为go mod
,go mod
变成了demo2
- 跟这次提交有关
ae4dd7f
ae4dd7f#diff-6d92e818d3a386823db461606eee3e88a3cc7c959f96615fa44af32d8bd3f0cfR125
What you expected to happen:
两种可行方案
- 新生成项目可以根据传递的路径作为 go mod (与以前保持一致)
- 新增参数
--mod
用户可手动指定生成新的项目go mod
(推荐使用这种)
How to reproduce it (as minimally and precisely as possible):
使用 kratos new
传递多级目录,只会使用最后一个目录作为 go mod
Anything else we need to know?:
Environment:
- Kratos version (use
kratos -v
):
kratos -v
kratos version v2.6.1
- Go version (use
go version
):
go version
go version go1.20.3 darwin/arm64
- OS (e.g:
cat /etc/os-release
):
uname -v
Darwin Kernel Version 21.6.0: Mon Dec 19 20:43:09 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T6000
- Others:
feiyangbeyond
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working