Skip to content

Commit 69b85d1

Browse files
committed
address deepsource comments
1 parent 6941459 commit 69b85d1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

client_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,13 @@ func TestMultiLabelNode(t *testing.T) {
439439
// create a multi label node
440440
multiLabelNode := NodeNew([]string{"A","B"}, "n", nil)
441441
graph.AddNode(multiLabelNode)
442-
res, err := graph.Commit()
442+
_, err = graph.Commit()
443+
assert.Nil(t, err)
443444

444445
// fetch node
445-
res, err = graph.Query("MATCH (n) RETURN n")
446+
res, err := graph.Query("MATCH (n) RETURN n")
447+
assert.Nil(t, err)
448+
446449
res.Next()
447450
r := res.Record()
448451
n := r.GetByIndex(0).(*Node)

graph.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func (g *Graph) CallProcedure(procedure string, yield []string, args ...interfac
272272
}
273273
q += fmt.Sprintf("%s)", strings.Join(tmp, ","))
274274

275-
if yield != nil && len(yield) > 0 {
275+
if len(yield) > 0 {
276276
q += fmt.Sprintf(" YIELD %s", strings.Join(yield, ","))
277277
}
278278

query_result.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,10 @@ func (qr *QueryResult) parseRecords(raw_result_set []interface{}) {
139139
case COLUMN_SCALAR:
140140
s, _ := redis.Values(c, nil)
141141
values[idx] = qr.parseScalar(s)
142-
break
143142
case COLUMN_NODE:
144143
values[idx] = qr.parseNode(c)
145-
break
146144
case COLUMN_RELATION:
147145
values[idx] = qr.parseEdge(c)
148-
break
149146
default:
150147
panic("Unknown column type.")
151148
}

0 commit comments

Comments
 (0)