Sorry. In the spirit of Go, you're not allowed to re-use this analogy; you're going to need to write another different one that can perform a similar function.
It's ok if you copy and paste some of the text from the first analogy and structure it similarly, though.
Go doesn't take any approach to writing generic code at all.
And then the code I've seen is littered with "interface {}".
That's a pretty big thing to give up, and I don't get the point. Something like F# gives you high level features (and green threads if you want) with fair perf, and Rust gives you a fair amount of language with C perf.
Well, sure, I guess you can pound a screw into things with a hammer but you're missing the point.
1) Methods with names that indicate the parameter types. 2) Method calls on objects to convert some internal struct data from one type to another. 3) Something I haven't thought of that doesn't involve losing a handle on your type.
So there is certainly a loss in convenience, but if you use the type system it can be just as safe as a functional language as far as I can tell. So, yeah, it isn't as intellectually elegant, but it also isn't really that hard to deal with.
The only way to write this kind of generic code in Go is to cast everything to `interface{}`, which can't be checked statically.
If you are still not convinced, one of the things you can do with generics is say "these two parameters have the same type". In Go the best you can do is say "these two parameters are subclasses of something", which is less precise.
You want to use different screws? You're on your own.
Which would be just as bad as for a car, since the things that drive and guide a tank tread are wheels (drive wheels and road wheels.)
To overburden an analogy, it'd be more like complaining that your tank doesn't have wheels[0], or your hovercraft. Go takes a different approach to the same problem (in this analogy, getting from point A to point B).
But really, this is a rather tired flamewar that gets beaten to death literally every time a post about Go makes the front page, and there's really nothing more that can be said about it. Either program in idiomatic Go, which means using the language as it's designed (ie, without generics, at least in its current form), or don't, but it's very tiresome to see this argument rehashed again and again.
[0] https://en.wikipedia.org/wiki/Continuous_track#mediaviewer/F...