mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: fix createDatabase arg not recognized bug
This commit is contained in:
parent
4f5396c70e
commit
ff87c4ea33
9
main.go
9
main.go
@ -30,9 +30,14 @@ import (
|
||||
"github.com/casdoor/casdoor/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
createDatabase := *flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
||||
func getCreateDatabaseFlag() bool {
|
||||
res := flag.Bool("createDatabase", false, "true if you need Casdoor to create database")
|
||||
flag.Parse()
|
||||
return *res
|
||||
}
|
||||
|
||||
func main() {
|
||||
createDatabase := getCreateDatabaseFlag()
|
||||
|
||||
object.InitAdapter()
|
||||
object.CreateTables(createDatabase)
|
||||
|
Loading…
x
Reference in New Issue
Block a user