Skip to content

Commit

Permalink
T
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Christoff committed Apr 21, 2021
1 parent f3754d9 commit c9a6551
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions v2/bolt_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions v2/bolt_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit c9a6551

Please sign in to comment.