// E8VM opens the storage layer for e8vm.io func E8VM(c *shanhu.Config) (*shanhu.Storage, error) { repoDB, err := repodb.Open(c.MysqlDB) if err != nil { return nil, err } return &shanhu.Storage{ RepoDB: repoDB, }, nil }
func openDB() repodb.DB { if *useMysql { db, err := repomy.Open(*dbPath) if err != nil { log.Fatal(err) } return db } db, err := repolite.Open(*dbPath) if err != nil { log.Fatal(err) } return db }