Useful Resources that Helped me Learn Golang over the Years

The purpose of this post is to share my catalogue of useful links I’ve gathered in my quest to better understand Golang. If I’ve used a webpage to solve a problem, or if I used a link to learn something, then you’ll find a link of it here.

Please note this is an article I’ll be periodically updating so feel free to check back often. If you find any links you’ve used which you would like to recommend, please don’t hesitate and write them in the comments below. Also please note, this list is my personal list and is by no means any definitive list.

Basics - Learn Golang from Scratch

golangbot.com

This is the resource I used to learn Golang from scratch. When asked were did you learn Golang, I always recommend this resource. Visit webpage via golangbot.com.

Honourable Mentions:

These look like very promising resources I have not had enough time to read in-depth:

Engineering & Architecture

Project Layout

When organizing project hierarchy of my Golang app, I always refer to the project layout.

How I Organize Structs in Go Projects

I officially use the organization in this in my projects and can confirm having success with it. The TL;DR is that:

  • Use IDO to store structures which no other Golang project will access (Used by frontend, ex: React app)
  • Use TDO to share data structures between projects. (Used by micro-services).
  • Use Model to store structures used in the data layer for your app to access the database.
  • Write code to convert from TDO to Model and vice versa. Keep a strict separation.

Read article.

Thoughts on the repository pattern in Golang

I have participated in projects with no ORM and thus had to write a data layer with SQL queries to communicate with a database. I found success using the repository pattern in Golang.

Read article.

Honourable Mentions

Web Development (Standard Library):

Go’s std net/http is all you need … right?

If you’ve always used frameworks for web-development and you want to better understand why Golang can potentially be used without frameworks then this is a great article start! After reading it I better understood the PRO/CON of using the standard library instead of a framework. Read article

Different approaches to HTTP routing in Go

Incredible article explaining the challenge of writing your own http router and various solutions. I have learned to use the Split switch algorithm for my projects when using the Go std. Understanding the http routing algorithms is essential in helping you write web-applications utilizing Golang std versus using a framework. Read article

Web Development (Web Frameworks)

The only libraries (aka Frameworks) that I am familiar with:

Chi

A library which utilizes the standard library but provides conveniences.

Fiber

A library which is doesn’t use the standard library router but instead is built on top of the fasthttp router.

Database:

Unit Tests & Mocking

Networking

Security

QA

Timekeeping

Preparing for Job Interviews

News Sites to Follow:

TODO:

https://stackoverflow.com/questions/22688906/go-naming-conventions-for-const


See also