初步完成model的初始化

This commit is contained in:
2024-04-08 00:03:37 +08:00
parent e79bc34225
commit b9f993df3b
68 changed files with 1524 additions and 8 deletions

View File

@@ -21,6 +21,13 @@ func TestGenActionsHandlerFunc(t *testing.T) {
createActionRoutesGen()
}
func TestCase2(t *testing.T) {
eg := `// device: string;`
re := regexp.MustCompile(` +([a-zA-Z_\-/]+)(\?{0,1}): +(\w+) ?;`)
vs := re.FindAllStringSubmatch(eg, -1)
log.Println(vs)
}
// 生成路由代码
func createActionRoutesGen() {
var err error
@@ -169,13 +176,6 @@ func getActionsInfo() map[string]*actionsFunc {
return actionsMap
}
func TestCase2(t *testing.T) {
eg := `// device: string;`
re := regexp.MustCompile(` +([a-zA-Z_\-/]+)(\?{0,1}): +(\w+) ?;`)
vs := re.FindAllStringSubmatch(eg, -1)
log.Println(vs)
}
func toCamelCase(s string) string {
var sb strings.Builder
capitalizeNext := true