Add db type set option
This commit is contained in:
parent
533d3e2286
commit
214715746a
@ -21,11 +21,15 @@ func init() {
|
|||||||
func main() {
|
func main() {
|
||||||
config.LoadConfig()
|
config.LoadConfig()
|
||||||
|
|
||||||
|
var database string
|
||||||
var dbDir string
|
var dbDir string
|
||||||
|
|
||||||
|
flag.StringVar(&database, "db", "gdbm", "database to be used")
|
||||||
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
|
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
ctx = context.WithValue(ctx, "Database", database)
|
||||||
// db := mem.NewMemDb()
|
// db := mem.NewMemDb()
|
||||||
// err := db.Connect(ctx, "")
|
// err := db.Connect(ctx, "")
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user