From 4e5237df8d15d6b031e0d2106df543b49775ea6b Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 1 Nov 2021 20:05:36 -0400 Subject: [PATCH] fix: inefficient assigns --- examples/basic2/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/basic2/main.go b/examples/basic2/main.go index 68525b97..980e03b8 100644 --- a/examples/basic2/main.go +++ b/examples/basic2/main.go @@ -35,6 +35,10 @@ func main() { return } prvKey, err := crypto.HexToECDSA(key) + if err != nil { + log.Error(err) + return + } ctx := context.Background() @@ -85,6 +89,10 @@ func write(ctx context.Context, wakuNode *node.WakuNode, msgContent string) { p.Key = &node.KeyInfo{Kind: node.None} payload, err := p.Encode(version) + if err != nil { + log.Error("Error encoding the payload: ", err) + return + } msg := &pb.WakuMessage{ Payload: payload,