Skip to content

Commit

Permalink
Add error handling for channel
Browse files Browse the repository at this point in the history
  • Loading branch information
ryn5 committed Oct 11, 2023
1 parent 84ac5eb commit 4066353
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gremlin-go/example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func basicGremlinExample() {
// Iterate() does not return any data and is used to just generate side-effects (i.e. write data to the database)
promise := g.V(v1Vertex).AddE("knows").To(v2Vertex).Property("weight", 0.75).Iterate()
err = <-promise
if err != nil {
fmt.Println(err)
return
}
promise = g.V(v1Vertex).AddE("knows").To(v3Vertex).Property("weight", 0.75).Iterate()
err = <-promise
if err != nil {
Expand Down

0 comments on commit 4066353

Please sign in to comment.