Skip to content

Commit bd1ef05

Browse files
authored
fix: go-libp2p-core -> go-libp2p/core (#318)
1 parent 37935bc commit bd1ef05

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

content/concepts/fundamentals/protocols.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ developer-friendly and enables [easier matching by version](#match-using-semver)
4747
#### Handler functions
4848

4949
To accept connections, a libp2p application will register handler functions for protocols using their protocol id with the
50-
[switch][definition_switch] (aka "swarm"), or a higher level interface such as [go's Host interface](https://github.com/libp2p/go-libp2p-core/blob/master/host/host.go).
50+
[switch][definition_switch] (aka "swarm"), or a higher level interface such as [go's Host interface](https://github.com/libp2p/go-libp2p/blob/master/core/host/host.go).
5151

5252
The handler function will be invoked when an incoming stream is tagged with the registered protocol id.
5353
If you register your handler with a [match function](#using-a-match-function), you can choose whether

content/concepts/security/dos-mitigation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ accounting abstraction that you can make use of in your own application.
214214

215215
Depending on your use case, it can help to limit the rate of inbound
216216
connections. You can use go-libp2p's
217-
[ConnectionGater](https://pkg.go.dev/github.com/libp2p/go-libp2p-core/connmgr#ConnectionGater)
217+
[ConnectionGater](https://pkg.go.dev/github.com/libp2p/go-libp2p/core/connmgr#ConnectionGater)
218218
and `InterceptAccept` for this. For a concrete example, take a look at how Prysm
219219
implements their [Connection
220220
Gater](https://github.com/prysmaticlabs/prysm/blob/63a8690140c00ba6e3e4054cac3f38a5107b7fb2/beacon-chain/p2p/connection_gater.go#L43).

content/guides/getting-started/go.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Now that we have the ability to configure and start libp2p nodes, we can start c
197197
A node started with go-libp2p will run its own ping protocol by default, but let's disable it and
198198
set it up manually to demonstrate the process of running protocols by registering stream handlers.
199199

200-
The object returned from `libp2p.New` implements the [Host interface](https://pkg.go.dev/github.com/libp2p/go-libp2p-core/host#Host),
200+
The object returned from `libp2p.New` implements the [Host interface](https://pkg.go.dev/github.com/libp2p/go-libp2p/core/host#Host),
201201
and we'll use the `SetStreamHandler` method to set a handler for our ping protocol.
202202

203203
First, let's add the `github.com/libp2p/go-libp2p/p2p/protocol/ping` package to our list of
@@ -247,15 +247,15 @@ send it ping messages.
247247

248248
We'll first expand the log message that we've been printing after starting the node to include
249249
its `PeerId` value, as we'll need that to instruct other nodes to connect to it. Let's import the
250-
`github.com/libp2p/go-libp2p-core/peer` package and use it to replace the "Listen addresses" log
250+
`github.com/libp2p/go-libp2p/core/peer` package and use it to replace the "Listen addresses" log
251251
message with something that prints both the listen address and the `PeerId` as a multiaddr string:
252252

253253
```go
254254
import (
255255
...
256256

257257
"github.com/libp2p/go-libp2p"
258-
peerstore "github.com/libp2p/go-libp2p-core/peer"
258+
peerstore "github.com/libp2p/go-libp2p/core/peer"
259259
"github.com/libp2p/go-libp2p/p2p/protocol/ping"
260260
)
261261

@@ -291,7 +291,7 @@ import (
291291
...
292292

293293
"github.com/libp2p/go-libp2p"
294-
peerstore "github.com/libp2p/go-libp2p-core/peer"
294+
peerstore "github.com/libp2p/go-libp2p/core/peer"
295295
"github.com/libp2p/go-libp2p/p2p/protocol/ping"
296296
multiaddr "github.com/multiformats/go-multiaddr"
297297
)
@@ -353,7 +353,7 @@ import (
353353
"syscall"
354354

355355
"github.com/libp2p/go-libp2p"
356-
peerstore "github.com/libp2p/go-libp2p-core/peer"
356+
peerstore "github.com/libp2p/go-libp2p/core/peer"
357357
"github.com/libp2p/go-libp2p/p2p/protocol/ping"
358358
multiaddr "github.com/multiformats/go-multiaddr"
359359
)

0 commit comments

Comments
 (0)