Skip to content

Commit

Permalink
blockstore: replace go.uber.org/atomic with sync/atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Jun 17, 2023
1 parent abced78 commit abc4d0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions blockstore/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
dsq "github.com/ipfs/go-datastore/query"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log/v2"
uatomic "go.uber.org/atomic"
)

var logger = logging.Logger("blockstore")
Expand Down Expand Up @@ -137,7 +136,6 @@ func NoPrefix() Option {
func NewBlockstore(d ds.Batching, opts ...Option) Blockstore {
bs := &blockstore{
datastore: d,
rehash: uatomic.NewBool(false),
}

for _, o := range opts {
Expand All @@ -162,7 +160,7 @@ func NewBlockstoreNoPrefix(d ds.Batching) Blockstore {
type blockstore struct {
datastore ds.Batching

rehash *uatomic.Bool
rehash atomic.Bool
writeThrough bool
noPrefix bool
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ require (
go.opentelemetry.io/otel/exporters/zipkin v1.14.0
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
go.uber.org/atomic v1.10.0
go.uber.org/multierr v1.9.0
go.uber.org/zap v1.24.0
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb
Expand Down Expand Up @@ -159,6 +158,7 @@ require (
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/dig v1.15.0 // indirect
go.uber.org/fx v1.18.2 // indirect
golang.org/x/crypto v0.6.0 // indirect
Expand Down

0 comments on commit abc4d0c

Please sign in to comment.