-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# gocutter | ||
gocutter: A CLI for rapidly scaffolding Go projects with templates or by cloning existing structures. | ||
# go-cutter | ||
`go-cutter`是一个命令行工具,用于快速使用模板或克隆现有结构来脚手架Go项目。 | ||
|
||
# 功能特性 | ||
- 在模板项目根路径下执行命令可创建新的Go项目 | ||
- 自动替换 import 路径 | ||
- 自动更新 go.mod 文件中的模块名称 | ||
- 自动删除 .git 目录 | ||
|
||
***注意:一定要在模板项目的根路径下执行命令*** | ||
# 安装 | ||
```shell | ||
go install github.com/morehao/go-cutter@latest | ||
``` | ||
# 使用方法 | ||
## 初始化新项目 | ||
```shell | ||
cd /appTemplatePath | ||
go-cutter -d /yourAppPath | ||
``` | ||
- `-d, --destination`:新项目的目标目录,例如:`/user/myApp`。此参数为必填项。 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters