3 ms·
The stdlib is the best for clarity. But there are some excellent examples of how to structure projects depending on what you're trying to build. Mat Ryer gave a
by thinkingkong 6y ago
The stdlib is the best for clarity. But there are some excellent examples of how to structure projects depending on what you're trying to build. Mat Ryer gave an excellent talk on writing HTTP Services. If you want a good example on how to write distributed systems then Hashicorps' projects are more or less gorgeous.
https://medium.com/@matryer/how-i-write-go-http-services-after-seven-years-37c208122831 https://medium.com/@matryer/how-i-write-go-http-services-aft...
https://github.com/hashicorp https://github.com/hashicorp
- matwood 6y agoTo add to your point, Nic Jackson from hashicorp has a bunch of how-to videos and presentations that I've found good also. https://www.youtube.com/channel/UC2V1SxXFUa5YxVJvTsrCgyg https://www.youtube.com/channel/UC2V1SxXFUa5YxVJvTsrCgyg
- bewuethr 6y agoHe also wrote a book: https://www.packtpub.com/product/building-microservices-with-go/9781786468666 https://www.packtpub.com/product/building-microservices-with... The book might be good, but my copy had a problem with spurious characters in every code block, but that seems to be fixed in later printings.
- dastx 6y agoGreat resource! Thanks.
- nemo1618 6y ago> Hashicorps' projects are more or less gorgeous Is there a particular piece of code (as in, a single package/file/function) that jumps out to you as "gorgeous?" When I look at a random Hashicorp repo, it strikes me an impenetrable labyrinth.
- aprdm 6y agoTry to add a new feature or see how some feature works, with consul I did some greps over some features I used and followed the code.. was able to put a merge request upstream changing a behaviour I didn't like (configurable) within 4h (that didn't get accepted and that's OK)
- alexeldeib 6y agohttps://github.com/hashicorp/memberlist https://github.com/hashicorp/memberlist Fairly idiomatic/clean