mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 21:20:34 +07:00
17 lines
356 B
Go
17 lines
356 B
Go
package generation
|
|
|
|
import (
|
|
"fmt"
|
|
"nto_cli/entities"
|
|
"nto_cli/utils"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func Generate(structName string, fields []entities.Field) {
|
|
mkPath := strings.ToLower(fmt.Sprintf("%s/frontend/src/%s", utils.FindFrontendPath() , structName))
|
|
if err := os.Mkdir(mkPath, 0755); err != nil {
|
|
panic(err)
|
|
}
|
|
GenerateService(structName, mkPath)
|
|
} |