22 lines
460 B
Go
22 lines
460 B
Go
package lib
|
|
|
|
import (
|
|
"log"
|
|
"path/filepath"
|
|
|
|
"git.ymnuktech.ru/ymnuk/yt-gen-app/lib/templ"
|
|
)
|
|
|
|
func backendGenerateStructs() {
|
|
if len(Project.Interfaces) > 0 {
|
|
for i := range Project.Interfaces {
|
|
err := templ.PrepareTmplFile("tmpl/backend/structs/struct.tmpl",
|
|
Project.Interfaces[i],
|
|
filepath.Join(AppConfig.OutdirBackend, "structs", templ.AngularFilename(Project.Interfaces[i].Name)+".go"))
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|
|
}
|
|
}
|