christopherhesse/rethinkgo — pull request #20 by njalali (2013-07-30 00:21:53+00:00)
Title: DeleteAt requires a start and end index.

Go doesn't support "optional" parameters so I can see why DeleteAt was written the way it was. I've added a simple if to check whether or not end index is nil.

This helps reduce the amount of repeat code I have to write to get index values at runtime.

What I had before
```
err = r.Table(usersTable).Get(userId).Update(
r.Map{
"drops": r.Row.Attr("drops").DeleteAt(
r.Row.Attr("drops").IndexesOf(query).Nth(0), // Start position of drop to delete.
r.Row.Attr("drops").IndexesOf(query).Nth(0)) // End position of drop to delete. DUPLICATE
}).Run(session).One(&response)
```
What I have now
```
err = r.Table(usersTable).Get(userId).Update(
r.Map{
"drops": r.Row.Attr("drops").DeleteAt(
r.Row.Attr("drops").IndexesOf(query).Nth(0), // Start position of drop to delete.
nil,
}).Run(session).One(&response)
```

Thoughts?