Skip to content

clover.Open("path") doesn't make the directory automatically if not found in clover/v2 #158

@ahossameldin

Description

@ahossameldin
package main
import (
	//c1 "github.com/ostafen/clover"
	c2 "github.com/ostafen/clover/v2"
        "log"
)
func main() {
	//db1, err := c1.Open("clover-db") // this works fine and create it automatically if not found 
	db2, err := c2.Open("clover-db2")// this will complain that clover-db2 directory not found
	if err != nil {
		log.Fatal(err)
	}
}

Hi, i was trying to use clover a bit for testing purposes but when trying to open database using the first version it works fine and create directory for database automatically.
but when using v2 it doesn't work that way as it doesn't make the directory automatically and gives this error if not created beforehand.
2024/09/23 21:57:23 open clover-db2/data.db: no such file or directory
so i wonder what is the difference between the two versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions