func main() { fmt.Printf("Start DB ....") logger, _ := utils.New("logname") logger.Info("info...") db := dl.NewSDatabase("testdb", "./", logger) db.AddData(nil) }
// CreateDB function description : 创建DB // params : // return : func (this *SEngine) CreateDB(dbname string) error { this.db = dl.NewSDatabase(dbname, this.Pathname, this.Logger) if thie.db == nil { return fmt.Errorf("Create DB Error ") } return nil }