Skip to content

Commit 70f37fb

Browse files
committed
[fix] fixed ExampleGraphNew_tls per review
1 parent 8b9cd42 commit 70f37fb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

example_graph_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ func ExampleGraphNew_tls() {
100100
q := "CREATE (w:WorkPlace {name:'RedisLabs'}) RETURN w"
101101
res, _ := graph.Query(q)
102102

103+
res.Next()
103104
r := res.Record()
104105
w := r.GetByIndex(0).(*redisgraph.Node)
105106
fmt.Println(w.Label)

examples/redisgraph_tls_client/redisgraph_tls_client.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,8 @@ func main() {
7979

8080
graph := redisgraph.GraphNew("social", pool.Get())
8181

82-
q := "CREATE (w:WorkPlace {name:'RedisLabs'})"
83-
res, err := graph.Query(q)
84-
85-
q = "MATCH (w:WorkPlace) RETURN w"
86-
res, err = graph.Query(q)
82+
q := "CREATE (w:WorkPlace {name:'RedisLabs'}) RETURN w"
83+
res, _ := graph.Query(q)
8784

8885
res.Next()
8986
r := res.Record()

0 commit comments

Comments
 (0)