Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
chore: go mod tidy, gofmt, staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Aug 23, 2023
1 parent d74a465 commit 426364f
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require (
github.com/libp2p/go-libp2p v0.24.1
github.com/libp2p/go-libp2p-kad-dht v0.20.0
github.com/libp2p/go-libp2p-kbucket v0.5.0
github.com/libp2p/go-libp2p-peerstore v0.8.0
github.com/libp2p/go-libp2p-record v0.2.0
github.com/multiformats/go-multiaddr v0.8.0
github.com/multiformats/go-multicodec v0.7.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,6 @@ github.com/libp2p/go-libp2p-kad-dht v0.20.0 h1:1bcMa74JFwExCHZMFEmjtHzxX5DovhJ07
github.com/libp2p/go-libp2p-kad-dht v0.20.0/go.mod h1:qPIXdiZsLczhV4/+4EO1jE8ae0YCW4ZOogc4WVIyTEU=
github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA=
github.com/libp2p/go-libp2p-kbucket v0.5.0/go.mod h1:zGzGCpQd78b5BNTDGHNDLaTt9aDK/A02xeZp9QeFC4U=
github.com/libp2p/go-libp2p-peerstore v0.8.0 h1:bzTG693TA1Ju/zKmUCQzDLSqiJnyRFVwPpuloZ/OZtI=
github.com/libp2p/go-libp2p-peerstore v0.8.0/go.mod h1:9geHWmNA3YDlQBjL/uPEJD6vpDK12aDNlUNHJ6kio/s=
github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0=
github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk=
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
Expand Down
2 changes: 0 additions & 2 deletions head/head.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ const (
provCacheExpiry = time.Hour
)

var log = logging.Logger("hydra/hydra")

// BootstrapStatus describes the status of connecting to a bootstrap node.
type BootstrapStatus struct {
Done bool
Expand Down
2 changes: 1 addition & 1 deletion head/head_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/ipfs/go-datastore"
"github.com/ipfs/go-datastore/sync"
"github.com/libp2p/go-libp2p-peerstore/pstoreds"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
"github.com/libp2p/hydra-booster/head/opts"
hydratesting "github.com/libp2p/hydra-booster/testing"
)
Expand Down
2 changes: 1 addition & 1 deletion httpapi/httpapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

cid "github.com/ipfs/go-cid"
dsq "github.com/ipfs/go-datastore/query"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/hydra-booster/hydra"
"github.com/libp2p/hydra-booster/idgen"
)
Expand Down
2 changes: 1 addition & 1 deletion hydra/hydra.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
leveldb "github.com/ipfs/go-ds-leveldb"
"github.com/ipfs/go-libipfs/routing/http/client"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p-peerstore/pstoreds"
"github.com/libp2p/go-libp2p/core/host"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoreds"
hyds "github.com/libp2p/hydra-booster/datastore"
"github.com/libp2p/hydra-booster/head"
"github.com/libp2p/hydra-booster/head/opts"
Expand Down
2 changes: 1 addition & 1 deletion idgen/idgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"sync/atomic"

kbucket "github.com/libp2p/go-libp2p-kbucket"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"
kbucket "github.com/libp2p/go-libp2p-kbucket"
"golang.org/x/crypto/hkdf"
)

Expand Down
5 changes: 3 additions & 2 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/ncabatoff/process-exporter/collector"
"github.com/ncabatoff/process-exporter/config"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
necoll "github.com/prometheus/node_exporter/collector"
"go.opencensus.io/stats/view"
"go.opencensus.io/tag"
Expand Down Expand Up @@ -47,8 +48,8 @@ func buildProcCollector() (*collector.NamedProcessCollector, error) {
func ListenAndServe(address string) error {
// setup Prometheus
registry := prom.NewRegistry()
goCollector := prom.NewGoCollector()
procCollector := prom.NewProcessCollector(prom.ProcessCollectorOpts{})
goCollector := collectors.NewGoCollector()
procCollector := collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})

nodeCollector, err := necoll.NewNodeCollector(log.NewNopLogger())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion providers/unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package providers
import (
"context"

"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p-kad-dht/providers"
"github.com/libp2p/go-libp2p/core/peer"
)

func AddProviderNotSupported(backend providers.ProviderStore) providers.ProviderStore {
Expand Down

0 comments on commit 426364f

Please sign in to comment.