https://github.com/sasha-s/go-inline
From the readme:
Generic Data Structures/Algorithms in golang via code generation (glorified copy&paste).
One might one to use goinline tool to generate specific implementation of generic data structures, such as map, vector, matrix, set. Or to generate specific implementation of generic algorithms, such as sort, binary search.
Goals:
• Write code once
• Simple, readable and tested tested go code (e.g. no templates/language extensions)
• Type safety and speed all the way (e.g. no reflection)
• No magic, everything is explicit
Feedback is very welcome.
Sasha