Closed F0rzend closed 2 months ago
Hi, sounds great, but will your generics solution be compatible with go1.17 and earlier?
Hi, sounds great, but will your generics solution be compatible with go1.17 and earlier?
I don't think so... I understand you
Okay, I close the issue but we can back for this after 1-2 years because it's good idea.
Your transaction contains method that returns "raw" tx (sql.Tx, sqlx.Tx, etc.) as interface{} (any): https://github.com/avito-tech/go-transaction-manager/blob/main/trm/transaction.go#L44
It seems to me that the API will be more convenient if the transaction is made generalized (generic).
Something like:
With this solution, you don't have to transform the interface to a specific transaction every time in your code.
What do you think about this? If you give approve, I could do it.