Skip to content

Commit 4548d17

Browse files
committed
update
1 parent 3a9a1ad commit 4548d17

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

codegen/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func createBaseProject() {
190190
//pre check success
191191
fmt.Println("start create base project.")
192192

193-
statusapi.CreatePathAndFile()
193+
statusapi.CreatePathAndFile(*name)
194194
statusapi.Execute(*packagename, *name)
195195

196196
ecode.CreatePathAndFile()

codegen/tml/api/status/template_status.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ func init() {
5656
panic(fmt.Sprintf("create template error:%s", e))
5757
}
5858
}
59-
func CreatePathAndFile() {
59+
func CreatePathAndFile(ProjectName string) {
6060
var e error
6161
if e = os.MkdirAll(path, 0755); e != nil {
6262
panic(fmt.Sprintf("make dir:%s error:%s", path, e))
6363
}
64-
file, e = os.OpenFile(path+name, os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0644)
64+
file, e = os.OpenFile(path+ProjectName+name, os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0644)
6565
if e != nil {
66-
panic(fmt.Sprintf("make file:%s error:%s", path+name, e))
66+
panic(fmt.Sprintf("make file:%s error:%s", path+ProjectName+name, e))
6767
}
6868
}
6969
func Execute(PackageName, ProjectName string) {

codegen/tml/gomod/template_gomod.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const text = `module {{.}}
1111
go 1.18
1212
1313
require (
14-
github.com/chenjie199234/config v0.1.1
15-
github.com/chenjie199234/Corelib v0.0.64
14+
github.com/chenjie199234/config v0.1.2
15+
github.com/chenjie199234/Corelib v0.0.65
1616
github.com/fsnotify/fsnotify v1.5.1
1717
github.com/go-sql-driver/mysql v1.6.0
1818
github.com/segmentio/kafka-go v0.4.31

0 commit comments

Comments
 (0)