Compare commits

...

3 Commits

Author SHA1 Message Date
ayflying
6d2b68a202 修改服务生成造成的错误 2025-02-26 18:14:42 +08:00
ayflying
144e2ffb25 修复配置切片的问题 2025-02-26 16:32:19 +08:00
乔焰阳
0a1c3c436e Create README.md 2025-02-26 16:11:14 +08:00
3 changed files with 10 additions and 2 deletions

8
README.md Normal file
View File

@@ -0,0 +1,8 @@
go语言工具类
####
进行安装
~~~
go get github.com/ayflying/utility_go
~~~

View File

@@ -91,7 +91,7 @@ func (c *cMake) Logic(name string) (err error) {
//生成文件不覆盖 //生成文件不覆盖
if !gfile.Exists(filePath) { if !gfile.Exists(filePath) {
//fileStr := gfile.GetContents("./make/logic") //fileStr := gfile.GetContents("./make/logic")
get, _ := fs.ReadFile(ConfigFiles, "make/act") get, _ := fs.ReadFile(ConfigFiles, "make/logic")
fileStr := string(get) fileStr := string(get)
fileStr = gstr.Replace(fileStr, "{package}", name) fileStr = gstr.Replace(fileStr, "{package}", name)
fileStr = gstr.Replace(fileStr, "{name}", gstr.CaseCamel(name)) fileStr = gstr.Replace(fileStr, "{name}", gstr.CaseCamel(name))

View File

@@ -140,7 +140,7 @@ func (s *Excel) sliceFormat(list []interface{}, Slice map[string]string) []inter
if get, ok := v3.(string); !ok { if get, ok := v3.(string); !ok {
//g.Log().Errorf(gctx.New(), "当前类型断言失败:%v", v3) //g.Log().Errorf(gctx.New(), "当前类型断言失败:%v", v3)
parts = []string{gconv.String(v3)} parts = []string{gconv.String(v3)}
continue
} else { } else {
for _, v := range shadiao { for _, v := range shadiao {
get = strings.ReplaceAll(get, v, "|") get = strings.ReplaceAll(get, v, "|")