examples: stop using deprecated peer.ID.Pretty (#2563)

Signed-off-by: Icarus9913 <icaruswu66@qq.com>
This commit is contained in:
Icarus9913
2023-09-11 22:28:38 +08:00
committed by GitHub
parent 0509445ff4
commit 2835a3a220
10 changed files with 14 additions and 14 deletions

View File

@@ -144,7 +144,7 @@ func (p *ProxyService) Serve() {
// Streams are multiplexed over single connections so, unlike connections
// themselves, they are cheap to create and dispose of.
func (p *ProxyService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fmt.Printf("proxying request for %s to peer %s\n", r.URL, p.dest.Pretty())
fmt.Printf("proxying request for %s to peer %s\n", r.URL, p.dest)
// We need to send the request to the remote libp2p peer, so
// we open a stream to it
stream, err := p.host.NewStream(context.Background(), p.dest, Protocol)