apple / apple/foundationdb

Make use of generic in go bindings

Open
#9,455 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

The current go bindings are not using [generics](https://go.dev/blog/intro-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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Go bindings and the Transact call, then compare their current interface{} return behavior with the usage example in fdbclient/lock_client.go. The issue does not identify specific binding files or tests; first establish whether generics fit the API and determine the required Go 1.18 compatibility changes before defining completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.