-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgosql.go
More file actions
34 lines (29 loc) · 712 Bytes
/
gosql.go
File metadata and controls
34 lines (29 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package gosql
import (
"fmt"
"os"
"github.com/arjendevos/gosql/functions"
)
type GoSQLConfig struct {
SchemeDir string
MigrationDir string
ModelOutputDir string
ControllerOutputDir string
SetupProject bool
TypesOutputDir string
}
func Convert(c *GoSQLConfig) {
dir, _ := os.Getwd()
err := functions.Convert(&functions.GoSQLConfig{
SchemeDir: dir + "/" + c.SchemeDir,
MigrationDir: dir + "/" + c.MigrationDir,
ModelOutputDir: c.ModelOutputDir,
ControllerOutputDir: c.ControllerOutputDir,
SetupProject: c.SetupProject,
TypesOutputDir: c.TypesOutputDir,
})
if err != nil {
fmt.Println("ERR", err)
os.Exit(1)
}
}