From 8ecb9e962dd803f22243a67efae5b6a4c226df20 Mon Sep 17 00:00:00 2001 From: xuyang Date: Thu, 8 Aug 2024 10:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.sum | 10 ++++++++++ main.go | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 go.sum diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e929475 --- /dev/null +++ b/go.sum @@ -0,0 +1,10 @@ +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/main.go b/main.go index f62a702..b4bb377 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ func main() { flag.StringVar(&localTemplatePath, "local", "", "本地模板路径") flag.StringVar(&remoteTemplatePath, "remote", "", "远程仓库url") flag.StringVar(&projectName, "name", "", "项目名称") - flag.StringVar(&branch, "branch", "main", "要使用的分支(仅当模板是远程仓库时)") + flag.StringVar(&branch, "branch", "master", "要使用的分支(仅当模板是远程仓库时)") flag.Parse() if localTemplatePath == "" && remoteTemplatePath == "" { @@ -93,7 +93,7 @@ func handleRemoteTemplate(templateRepo, branch, projectName string, replacements func getReplacements() map[string]string { scanner := bufio.NewScanner(os.Stdin) replacements := make(map[string]string) - fmt.Println("输入替换值(key=value),空行结束: ") + fmt.Println("输入替换值(key=value),空行回车结束: ") for { fmt.Print("> ") scanner.Scan()