From eb2582bbde87a353dbc5c83ae7da622c7d61ffe2 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 15 Jan 2020 04:50:22 -0800 Subject: [PATCH] walletdb: update examples to acccount for new 2nd param for bdb Open/Create --- walletdb/db_test.go | 2 +- walletdb/example_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/walletdb/db_test.go b/walletdb/db_test.go index 95ce2de..48b60c3 100644 --- a/walletdb/db_test.go +++ b/walletdb/db_test.go @@ -55,7 +55,7 @@ func TestAddDuplicateDriver(t *testing.T) { } dbPath := "dupdrivertest.db" - db, err := walletdb.Create(dbType, dbPath) + db, err := walletdb.Create(dbType, dbPath, true) if err != nil { t.Errorf("failed to create database: %v", err) return diff --git a/walletdb/example_test.go b/walletdb/example_test.go index 73dda14..4cb5134 100644 --- a/walletdb/example_test.go +++ b/walletdb/example_test.go @@ -28,7 +28,7 @@ func ExampleCreate() { // this, but it's done here in the example to ensure the example cleans // up after itself. dbPath := filepath.Join(os.TempDir(), "examplecreate.db") - db, err := walletdb.Create("bdb", dbPath) + db, err := walletdb.Create("bdb", dbPath, true) if err != nil { fmt.Println(err) return @@ -47,7 +47,7 @@ var exampleNum = 0 func exampleLoadDB() (walletdb.DB, func(), error) { dbName := fmt.Sprintf("exampleload%d.db", exampleNum) dbPath := filepath.Join(os.TempDir(), dbName) - db, err := walletdb.Create("bdb", dbPath) + db, err := walletdb.Create("bdb", dbPath, true) if err != nil { return nil, nil, err } @@ -111,7 +111,7 @@ func Example_basicUsage() { // this, but it's done here in the example to ensure the example cleans // up after itself. dbPath := filepath.Join(os.TempDir(), "exampleusage.db") - db, err := walletdb.Create("bdb", dbPath) + db, err := walletdb.Create("bdb", dbPath, true) if err != nil { fmt.Println(err) return