Add db type set option

This commit is contained in:
lash 2024-12-05 15:17:36 +00:00
parent 533d3e2286
commit 214715746a
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -21,11 +21,15 @@ func init() {
func main() {
config.LoadConfig()
var database string
var dbDir string
flag.StringVar(&database, "db", "gdbm", "database to be used")
flag.StringVar(&dbDir, "dbdir", ".state", "database dir to read from")
flag.Parse()
ctx := context.Background()
ctx = context.WithValue(ctx, "Database", database)
// db := mem.NewMemDb()
// err := db.Connect(ctx, "")
// if err != nil {