diff --git a/v2/bolt_store.go b/v2/bolt_store.go index 8bdbbdb..3024a34 100644 --- a/v2/bolt_store.go +++ b/v2/bolt_store.go @@ -271,9 +271,9 @@ func (b *BoltStore) Sync() error { return b.conn.Sync() } -// MigratetoV2 reads in the source file path of a BoltDB file +// MigrateToV2 reads in the source file path of a BoltDB file // and outputs all the data migrated to a Bbolt destination file -func MigratetoV2(source, destination string) (*BoltStore, error) { +func MigrateToV2(source, destination string) (*BoltStore, error) { _, err := os.Stat(destination) if err == nil { return nil, fmt.Errorf("file exists in destination %v", destination) diff --git a/v2/bolt_store_test.go b/v2/bolt_store_test.go index 65d37f0..7a55de0 100644 --- a/v2/bolt_store_test.go +++ b/v2/bolt_store_test.go @@ -417,7 +417,7 @@ func TestBoltStore_SetUint64_GetUint64(t *testing.T) { } } -func TestBoltStore_MigratetoV2(t *testing.T) { +func TestBoltStore_MigrateToV2(t *testing.T) { dir, err := ioutil.TempDir("", t.Name()) if err != nil { @@ -455,7 +455,7 @@ func TestBoltStore_MigratetoV2(t *testing.T) { t.Fatalf("failed closing source database: %s", err) } - destDb, err := MigratetoV2(srcFile, destFile) + destDb, err := MigrateToV2(srcFile, destFile) if err != nil { t.Fatalf("did not migrate successfully, err %v", err) }