ยท 3 days agoยท Dev.to
Unlocking Go Generics: Streamlining Code for Developers
I had three repositories that looked identical. UserRepository, ProductRepository, OrderRepository: same structure, same FindByID, same List, same pagination logic. The only difference was the return type. Three copies of the same code. When Go 1.18 shipped with generics, I wanted to merge them all.
#go#generics#code efficiency#software development#india tech