Open johscheuer opened 3 years ago
We ran in a pretty weird issue where we use golang and client.database.Transact which could result in a nil as return value (https://github.com/FoundationDB/fdb-kubernetes-operator/pull/478). In the actual method we always return a boolean value (https://github.com/FoundationDB/fdb-kubernetes-operator/blob/master/controllers/lock_client.go#L84-L140) I couldn't find any notice about this behaviour in the docs https://pkg.go.dev/github.com/apple/foundationdb/bindings/go/src/fdb. So I just wanted to ask if we hit a strange error or if this iss just a behaviour that should be documented?
client.database.Transact
I mean the simple example suggest that there is no need to check for nil: https://pkg.go.dev/github.com/apple/foundationdb/bindings/go/src/fdb#hdr-Basic_Usage
It may be that in that example it's not necessary to check if ret is nil because it's explicitly checking if err is not nil. Still, it's probably best to get that contract documented.
ret
err
We ran in a pretty weird issue where we use golang and
client.database.Transact
which could result in a nil as return value (https://github.com/FoundationDB/fdb-kubernetes-operator/pull/478). In the actual method we always return a boolean value (https://github.com/FoundationDB/fdb-kubernetes-operator/blob/master/controllers/lock_client.go#L84-L140) I couldn't find any notice about this behaviour in the docs https://pkg.go.dev/github.com/apple/foundationdb/bindings/go/src/fdb. So I just wanted to ask if we hit a strange error or if this iss just a behaviour that should be documented?I mean the simple example suggest that there is no need to check for nil: https://pkg.go.dev/github.com/apple/foundationdb/bindings/go/src/fdb#hdr-Basic_Usage