Skip to content

Instantly share code, notes, and snippets.

@voidabhi
Last active November 14, 2016 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voidabhi/8673af4886a4ccc864e178e2b42787b9 to your computer and use it in GitHub Desktop.
Save voidabhi/8673af4886a4ccc864e178e2b42787b9 to your computer and use it in GitHub Desktop.
Go language references

https://gist.github.com/zeisss/98f5bb5d6c01fe62225e

SO

Error Logging http://stackoverflow.com/questions/24809287/how-do-you-get-a-golang-program-to-print-the-line-number-of-the-error-it-just-ca

Versioning http://stackoverflow.com/questions/11354518/golang-application-auto-build-versioning?rq=1

Periodic Tasks http://stackoverflow.com/questions/16466320/is-there-a-way-to-do-repetitive-tasks-at-intervals-in-golang

Code Quality Tools

https://github.com/mre/awesome-static-analysis#go

Design/Architecture Pattern Implementations

Plugin Architecture http://stackoverflow.com/questions/28001872/golang-events-eventemitter-dispatcher-for-plugin-architecture

Redux Architecture https://github.com/luisvinicius167/godux

Learnings

Accept interfaces return structs for better maintainability and testing http://idiomaticgo.com/post/best-practice/accept-interfaces-return-structs/

Perfomrmance Queries

go test dynamic_select_test.go -test.bench=.

Goroutines Snippets

Error handling/Multiple Returns inside goroutines https://www.atatus.com/blog/goroutines-error-handling/ http://garrypolley.com/2016/02/10/golang-routines-errors/ http://stackoverflow.com/questions/25142016/return-error-from-the-channel http://stackoverflow.com/questions/17825857/how-to-make-a-channel-that-receive-multiple-return-values-from-a-goroutine?rq=1

Stopping a goroutine http://stackoverflow.com/questions/6807590/how-to-stop-a-goroutine?rq=1

Listening to multiple channels at runtime http://stackoverflow.com/questions/19992334/how-to-listen-to-n-channels-dynamic-select-statement?rq=1

For range for channels http://stackoverflow.com/questions/14075382/how-do-i-catch-the-exception-of-a-channel-deadlocking?rq=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment