Skip to content

Commit

Permalink
chore: Update Go module name and import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
i5heu committed May 7, 2024
1 parent 2d72bd8 commit 0b00f64
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions cmd/benchmark/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
"OuroborosDB/internal/keyValStore"
"OuroborosDB/internal/storage"
"fmt"
"log"
"os"
"ouroboros-db/internal/keyValStore"
"ouroboros-db/internal/storage"
"path/filepath"
"sync"
"sync/atomic"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module OuroborosDB
module ouroboros-db

go 1.21.5

Expand Down
2 changes: 1 addition & 1 deletion internal/index/index.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package index

import (
"OuroborosDB/internal/storage"
"ouroboros-db/internal/storage"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/keyValStore/keyValStore.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package keyValStore

import (
"OuroborosDB/pkg/buzhashChunker"
"encoding/hex"
"fmt"
"ouroboros-db/pkg/buzhashChunker"
"runtime"
"sync/atomic"
"time"
Expand Down
4 changes: 2 additions & 2 deletions internal/storage/storageService.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package storage

import (
"OuroborosDB/internal/keyValStore"
"OuroborosDB/pkg/buzhashChunker"
"fmt"
"log"
"ouroboros-db/internal/keyValStore"
"ouroboros-db/pkg/buzhashChunker"
"sync"
)

Expand Down
12 changes: 6 additions & 6 deletions OuroborosDB.go → ouroboros.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package OuroborosDB
package ouroboros

import (
"OuroborosDB/internal/index"
"OuroborosDB/internal/keyValStore"
"OuroborosDB/internal/storage"
"OuroborosDB/pkg/api"
"fmt"
"os"
"ouroboros-db/internal/index"
"ouroboros-db/internal/keyValStore"
"ouroboros-db/internal/storage"
"ouroboros-db/pkg/api"
"time"

"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -42,7 +42,7 @@ func initializeLogger() *logrus.Logger {
return log
}

func NewOuroborosDB(conf Config) (*OuroborosDB, error) {
func Newouroboros(conf Config) (*OuroborosDB, error) {
if conf.Logger == nil {
conf.Logger = initializeLogger()
log = conf.Logger
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/api.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package api

import "OuroborosDB/internal/storage"
import "ouroboros-db/internal/storage"

type DB interface {
StoreFile(options storage.StoreFileOptions) (storage.Event, error)
Expand Down
2 changes: 1 addition & 1 deletion pkg/outypes/types.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package outypes

import (
"OuroborosDB/internal/storage"
"ouroboros-db/internal/storage"
)

// Event represents an event in the EventChain, the absolute top of a EventChain is a RootEvent, look at rootEvents.go
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package OuroborosDB_test
package ouroboros_test

import (
"OuroborosDB/internal/storage"
"fmt"
"math/rand"
"ouroboros-db/internal/storage"
"testing"
"time"
)
Expand Down
12 changes: 6 additions & 6 deletions tests/OuroborosDB_test.go → tests/ouroboros_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package OuroborosDB_test
package ouroboros_test

import (
"OuroborosDB"
"OuroborosDB/internal/storage"
"fmt"
"math/rand"
"ouroboros-db"
"ouroboros-db/internal/storage"
"testing"
"time"
)
Expand All @@ -28,21 +28,21 @@ func randomString(n int) string {
return string(b)
}

func setupDBWithData(t testing.TB, conf setupDBConfig) (ou *OuroborosDB.OuroborosDB, backEventHashes [][64]byte) {
func setupDBWithData(t testing.TB, conf setupDBConfig) (ou *ouroboros.OuroborosDB, backEventHashes [][64]byte) {
if conf.totalEvents == 0 {
conf.totalEvents = 1000
}
if conf.eventLevels < 1 {
conf.eventLevels = 3
}

ou, err := OuroborosDB.NewOuroborosDB(OuroborosDB.Config{
ou, err := ouroboros.Newouroboros(ouroboros.Config{
Paths: []string{t.TempDir(), t.TempDir()},
MinimumFreeGB: 1,
GarbageCollectionInterval: 10,
})
if err != nil {
t.Errorf("NewOuroborosDB failed with error: %v", err)
t.Errorf("Newouroboros failed with error: %v", err)
}

if conf.totalEvents == 1 {
Expand Down

0 comments on commit 0b00f64

Please sign in to comment.