chore: update goctl interface{} to any (#2819)

* chore: update goctl interface{} to any

* chore: update goctl interface{} to any
This commit is contained in:
Kevin Wan
2023-01-24 17:51:03 +08:00
committed by GitHub
parent ae87114282
commit eab904af64
32 changed files with 112 additions and 112 deletions

View File

@@ -55,7 +55,7 @@ func generateModel(ctx *Context) error {
}
output := filepath.Join(ctx.Output, fn+".go")
if err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]interface{}{
if err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]any{
"Type": stringx.From(t).Title(),
"lowerType": stringx.From(t).Untitle(),
"Cache": ctx.Cache,
@@ -80,7 +80,7 @@ func generateCustomModel(ctx *Context) error {
}
output := filepath.Join(ctx.Output, fn+".go")
err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]interface{}{
err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]any{
"Type": stringx.From(t).Title(),
"lowerType": stringx.From(t).Untitle(),
"snakeType": stringx.From(t).ToSnake(),
@@ -108,7 +108,7 @@ func generateTypes(ctx *Context) error {
}
output := filepath.Join(ctx.Output, fn+".go")
if err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]interface{}{
if err = util.With("model").Parse(text).GoFmt(true).SaveTo(map[string]any{
"Type": stringx.From(t).Title(),
}, output, false); err != nil {
return err