multi: fix linter errors

This commit is contained in:
Elle Mouton committed 2024-11-28 13:51:15 +02:00
1 parent fd2ea411be
commit 4089fbcb44
11 files changed
+276 -186

No files matched your search

+5 -3
View File
@@ -6533,7 +6533,9 @@ func (r *rpcServer) DescribeGraph(ctx context.Context,
// First iterate through all the known nodes (connected or unconnected
// within the graph), collating their current state into the RPC
// response.
err := graph.ForEachNode(func(_ kvdb.RTx, node *models.LightningNode) error {
err := graph.ForEachNode(func(_ kvdb.RTx,
node *models.LightningNode) error {
lnNode := marshalNode(node)
resp.Nodes = append(resp.Nodes, lnNode)
@@ -6563,7 +6565,7 @@ func (r *rpcServer) DescribeGraph(ctx context.Context,
return nil
})
if err != nil && err != graphdb.ErrGraphNoEdgesFound {
if err != nil && !errors.Is(err, graphdb.ErrGraphNoEdgesFound) {
return nil, err
}
@@ -6809,7 +6811,7 @@ func (r *rpcServer) GetNodeInfo(ctx context.Context,
// be returned.
node, err := graph.FetchLightningNode(pubKey)
switch {
case err == graphdb.ErrGraphNodeNotFound:
case errors.Is(err, graphdb.ErrGraphNodeNotFound):
return nil, status.Error(codes.NotFound, err.Error())
case err != nil:
return nil, err