Skip to content

Commit

Permalink
fix: data race
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Nov 25, 2024
1 parent 7e1b49c commit ecc9c7d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/storage/ledger/legacy/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type Store struct {
name string
}

func (s *Store) GetPrefixedRelationName(v string) string {
return fmt.Sprintf(`"%s".%s`, s.bucket, v)
func (store *Store) GetPrefixedRelationName(v string) string {
return fmt.Sprintf(`"%s".%s`, store.bucket, v)
}

func (store *Store) Name() string {
Expand All @@ -25,10 +25,9 @@ func (store *Store) GetDB() bun.IDB {
return store.db
}

func (s *Store) WithDB(db bun.IDB) *Store {
ret := *s
ret.db = db
return &ret
func (store Store) WithDB(db bun.IDB) *Store {
store.db = db
return &store
}

func New(
Expand Down

0 comments on commit ecc9c7d

Please sign in to comment.