1. The function passed to Client.ReadWriteTransaction now takes a context.Context as its first argument.
Instead of
c.ReadWriteTransaction(ctx, func(txn *spanner.ReadWriteTransaction) error {...})
write
c.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error {...})
The two contexts (the one you pass to ReadWriteTransaction, and the one we pass back to your function) are not the same.
2. We've revamped KeySets to make them easier to use. Now both Key and KeyRange act as KeySets, so instead of writing
spanner.Keys(spanner.Key{1})
where a KeySet is required, you can just write
spanner.Key{1}
and instead of
spanner.Range(KeyRange{...})
you can just write
KeyRange{...}
In fact, we removed the Keys and Range functions.
To construct more complicated KeySets, use the spanner.KeySets function (previously named UnionKeySets).
As part of this change, the Delete function takes a KeySet instead of a Key, and since that renders DeleteKeyRange obsolete, we removed it.