apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store

Home Page:https://apple.github.io/foundationdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make use of generic in go bindings

johscheuer opened this issue · comments

The current go bindings are not using generics but those might be a good fit for the bindings to not require a user to return an interface{} and parse it again. Using an interface{} always requires that a user does a type conversion after the Transact call e.g. https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/fdbclient/lock_client.go#L63-L71. I haven't looked to deep into the go bindings right know to see if we could make use of generics but I think that would be a good approach.

I created this issue to discuss this as using go generics would require go 1.18 from our clients.