4 ms·
The stdlib is kind of a mess. One kitchen, many cooks, and everyone was learning how to put a five-course meal together as they went. There are some great bits
by sagichmal 6y ago
The stdlib is kind of a mess. One kitchen, many cooks, and everyone was learning how to put a five-course meal together as they went. There are some great bits -- package io and ioutil, for example -- but a lot of it is full of what we now understand are bad ideas, and the compatibility promise prevents anyone from doing anything about it.
There is much better code to read. I second the recommendation of HashiCorp's stuff. Stay away from Docker and especially Kubernetes.
- geoah 6y agoCouldn't agree more. Cheney's response to why that is was "do as we say, not as we do".
- wbl 6y agoDo you have source / more details? There certainly are a few warts but overall it gets the job done.
- earthboundkid 6y agoFYI, ioutil is deprecated in Go 1.16. :-) They copied everything out of it and into io and os. It’s much cleaner actually once you get used to it.
- maerF0x0 6y agoAnother reason it is a bit of a mess is because of the no breaking changes promise. They have to keep ugly or deprecated interfaces unchanged, even into Go 2, iirc.