title: Collections in golang
body: <p>I am using golang as my server language (because I like learning new languages).
  As opposed to Python or Javascript, I like the fact that go is strongly typed.</p>
  <p>I am looking for a design pattern to allow me to create collections for custom objects.
  In Java, C#, or C++, I would use generics. In C, I would hack the pre-processor. In golang, I was not able to come up with a solution.</p>
  <p>I could always use interface{}, but then I would loose the advantages of strong typing. (Hello python/node.js runtime errors!)</p>
  <p>Currently I am just copy-pasting my collections for every new type that I need, but I find myself struggling to maintain the code base, as now have ~10 copies of each collection. So I'm looking for a better design pattern. (Also, every ounce of my being is telling me that this is a bad idea)</p>
  <p>I am not looking for a rant on how &quot;there's no generics in go&quot;. I'm looking for actual experienced golang devs who have encountered and designed around such issues.</p>