Open s417-lama opened 6 years ago
I think it makes more sense to return a list. Because in the case the elment(s) is/are found they are present in the list and otherwise the list is empty.
I would vote for fixing the type spec to insert([t()] | t()) :: [Diplomat.Key.t()] | Diplomat.Client.error()
According to Hex,
Diplomat.Entity.insert/1
's spec is:However, it seems that it returns
[Diplomat.Key.t()]
when success. I think it should return{:ok, Diplomat.Key.t()}
.