Skip to content

Commit 1b962cb

Browse files
committed
chore: fix golangci-lint errors
1 parent 2023a27 commit 1b962cb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/chat/chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func makeHost(port int, randomness io.Reader) (host.Host, error) {
167167
)
168168
}
169169

170-
func startPeer(ctx context.Context, h host.Host, streamHandler network.StreamHandler) {
170+
func startPeer(_ context.Context, h host.Host, streamHandler network.StreamHandler) {
171171
// Set a function as stream handler.
172172
// This function is called when a peer connects, and starts a stream with this protocol.
173173
// Only applies on the receiving side.

examples/echo/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func getHostAddress(ha host.Host) string {
9696
return addr.Encapsulate(hostAddr).String()
9797
}
9898

99-
func startListener(ctx context.Context, ha host.Host, listenPort int, insecure bool) {
99+
func startListener(_ context.Context, ha host.Host, listenPort int, insecure bool) {
100100
fullAddr := getHostAddress(ha)
101101
log.Printf("I am %s\n", fullAddr)
102102

@@ -121,7 +121,7 @@ func startListener(ctx context.Context, ha host.Host, listenPort int, insecure b
121121
}
122122
}
123123

124-
func runSender(ctx context.Context, ha host.Host, targetPeer string) {
124+
func runSender(_ context.Context, ha host.Host, targetPeer string) {
125125
fullAddr := getHostAddress(ha)
126126
log.Printf("I am %s\n", fullAddr)
127127

examples/ipfs-camp-2019/07-Messaging/pubsub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func pubsubMessageHandler(id peer.ID, msg *SendMessage) {
1616
fmt.Printf("%s: %s\n", id.ShortString(), msg.Data)
1717
}
1818

19-
func pubsubUpdateHandler(id peer.ID, msg *UpdatePeer) {
19+
func pubsubUpdateHandler(_ peer.ID, _ *UpdatePeer) {
2020

2121
}
2222

0 commit comments

Comments
 (0)