-
Notifications
You must be signed in to change notification settings - Fork 1
/
flags.go
30 lines (21 loc) · 871 Bytes
/
flags.go
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
package manager
import (
"flag"
)
var createSuperUserFlag bool
var listUsersFlag bool
var deleteAllUsersFlag bool
var initFlag bool
var executeRawSqlFlag string
var destroySchemaFlag bool
var appName string
func init() {
managerFlag := flag.NewFlagSet("manager", flag.ExitOnError)
managerFlag.StringVar(&appName, "app", "", "The name of the app to manage")
managerFlag.BoolVar(&listUsersFlag, "list-users", false, "List users")
managerFlag.BoolVar(&createSuperUserFlag, "create-superuser", false, "Create super user")
managerFlag.BoolVar(&deleteAllUsersFlag, "delete-all-users", false, "Delete all users")
managerFlag.BoolVar(&initFlag, "init", false, "Initialize database schema")
managerFlag.StringVar(&executeRawSqlFlag, "exec-sql", "", "Execute raw sql")
managerFlag.BoolVar(&destroySchemaFlag, "destroy-schema", false, "Destroy database schema")
}