You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
In the V2, boltdb is used by default. It looks like the bolt driver doesn't automatically create the folder, so just make sure it exists before opening your database
In the V2, boltdb is used by default. It looks like the bolt driver doesn't automatically create the folder, so just make sure it exists before opening your database
On 24/09/23 12:11PM, Ahmed Hossam wrote: so i wonder what is the difference between the two versions?
did you update your v2 clover? seems #123 solved for that. 😄 …
-- shane.xb.qian
@Shane-XB-Qian , how can i do that ? i just did go get github.com/ostafen/clover/v2 wouldn't it get the latest?
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?
The text was updated successfully, but these errors were encountered: