Open nemith opened 5 years ago
Since this would be an incompatible change, the milestone's got to be v2
.
This should be compatible since the function cannot just take anything we would just enforce it at compile time instead of runtime.
However looking at this further these really shouldn't take the packet definitions as options. As we add features like TTL there are two different packet definitions that the API consumer doesn't need to know about.
conn.Multi signature is
func (c *Conn) Multi(ops ...interface{}) ([]MultiResponse, error)
where ops is any type. However it will return an error if it is not one ofCreateRequest
,SetDataRequest
,DeleteRequest
, orCheckVersionRequest:
We could implement a interface that all these structs implement to limit to just the operations from the package. This could just return the opCode itself.