Golang (also called Go) is an in-demand programming language — especially for people working with Google products. Go is used by many big companies like Uber, Medium, Dropbox, Salesforce, Netflix, IBM, and Twitter.

Go is a great option for job seekers of all levels. But how do you get started? What do you need to know? Keep reading to know the best path for learning Go and building a solid portfolio.

What Is a Go Developer?

Golang is a statically typed, compiled programming language that was developed by Google in 2009. The language combines the efficiency of C++ and the readability of Python.

Golang developers use the Go language to build webpages and software products. A Go developer’s general duties include working with Go and using its full suite of tools and frameworks. Most Go developers also do testing and debugging.

Most job postings for Golang developers require a wide variety of other skills as well. The most common being:

  • Experience with scripting (Shell/PERL)
  • Experience in application design using design patterns
  • JavaScript, SOAP, REST web services, or microservices
  • Experience using Git
  • Knowledge of DevOps practices

The entry threshold for Go is relatively low. It’s an easy language to learn and comes with detailed technical documentation. Switching to Go is relatively easy for those who have experience with the C language.

So, if learning Go is easy, how do you actually get a job working with the language? Let’s break it down.

Step 1: Learn the Basics of Go

To become a Go developer, you need to have a solid understanding of the language and syntax. You can start by installing the language and teaching yourself, or you can take an online course to guide your learning. A good path for learning Go will look something like this:

  1. Filenames, keywords, identifiers
  2. Operators, types, functions, and constants
  3. Pointers, structures, methods
  4. Maps, arrays, slices
  5. Go CLI
  6. Interface
  7. Error handling
  8. Goroutine, Channel, Buffer
  9. Panic, Defer, Error, Recover
  10. Go design patterns

Your learning path will largely depend on your background. If you are completely new to programming, Go is a great first choice. It is easy to learn and mimics other popular languages like Python and C++. For new learners, it’s best to start with the basics like filenames, keywords, and identifiers. Then, you can build your foundation with data types, operators, and strings.

If you already have some programming experience, it’s also recommended to learn Go from scratch, starting with the unique characteristics of Go. Go is built on a different model than what you’re used to, and it treats object-oriented programming differently.

Go aims to reduce typing and complexity by using a minimal amount of keywords, so you will code less than in other languages like Java. Keywords can be parsed without a symbol table, as the grammar is LALR(1). Go acts like a hybrid, imperative language, but it is built with concurrency in mind. Here are some of the unique features of Go:

  • No function or operator overloading
  • No implicit conversions to avoid bugs
  • No classes or type inheritance
  • No variant types
  • No dynamic code loading or dynamic libraries
  • No assertions or immutable variables
Summary: Learn Go from scratch with a focus on its unique features and unique approach to OOP.

Step 2: Master Go Libraries and Other Tools

Once you have the basics of the language down, you should move on to the add-on libraries and tools that make Go easier to use. Most companies will expect you to have experience with:

  • Go dependency management tools
  • Semantic versioning
  • Scripts and repositories
  • Go libraries
  • SQL fundamentals
  • GIT
  • Basic authentication
  • HTTP/HTTPS
  • Web frameworks and routers
  • Relational databases (PostgreSQL)

If you already have some programming experience, you may have some of these in your tool belt. If not, don’t panic! You will learn most of these skills as you learn how to build with Golang and related technologies.

The most important of the extra things to learn are frameworks, Go libraries, and databases. Many of the other skills can be learned along the way or on the job.

  • In terms of frameworks, it is recommended to start with Echo, Beego, Gin, Revel, and Chi, with Echo being the most important for Go.
  • In terms of libraries, the most popular Go libraries are Go Kit, GORM, Gen, and CLI. Using good libraries and packages will make working with Go even easier. Each will have its own unique features, so it’s a good idea to pick one that aligns with your goals.
  • In terms of databases, it’s important to have some experience with relational databases, such as PostgreSQL or MySQL. Beyond that, knowledge of log frameworks can be useful, with Zap being the most important for Go.
Summary: Learn Go libraries and other tools needed to be a modern, efficient Golang developer.

Step 3: Learn Testing With Go

Testing is an important skill that most companies will be looking for. Software testing is how we check if the actual software product matches requirements and actually runs properly once distributed.

As a Go developer, you’ll be building products for the real world, so you need to test your products for usability and reliability. This includes:

  • Unit testing
  • Integration testing
  • Behaviour testing
  • E2E testing

Unit testing is arguably the most important for new Go developers. There is a built-in testing package in Go’s standard library. However, Go errs on the side of minimalism, so you may need additional tools for more robust testing, such as popular frameworks Ginkgo and GoCheck. Ginkgo can also be used for behaviour testing and integration testing.

Summary: Learn unit testing for Go using robust testing frameworks.

Step 4: Understand Go Patterns

Most employers want to see that you understand Go’s design patterns. A design pattern is a repeatable, general solution to a common problem in software design. Different design patterns help to divide business logic or define structure to help with certain tasks.

Go offers similar design patterns to other languages that fall under these general categories:

  • Structural
  • Creational
  • Behavioural
  • Concurrency
  • Stability

The most important are creational (such as builder, factory, singleton), behavioural (such as iterator, observer, command), and structural (such as adapter, bridge, decorator).

If you are already a programmer, you may be familiar with design patterns and can start learning them in the context of Go. If you’re new to programming, the best way to learn these is to actually begin coding with them. Borrow some sample implementations and build around them.

Summary: Understand Go’s design patterns by building things and borrowing sample implementations.

Step 5: Start Building Your Portfolio

Once you have these steps down, it’s time to start building things for your portfolio. This is how a company will see that you have real experience working with Golang. Also, it’s proven that the best way to master a language is to build functioning products with it, so the more you build, the more you learn.

Building out a portfolio includes:

  • Completing online courses on Go
  • Contributing to open source Go projects
  • Building Go projects from scratch
  • Implementing Go units in existing projects
  • Coding classic algorithm problems with Go
  • Completing courses on adjacent technologies (e.g. SQL)

You can really build anything you want to put your skills into practice, such as to-do lists for personal needs, demo websites, puzzles, games, and coding challenges.

Start with an online course that offers a certificate. You can add this to your resume to prove you have the basics down. Then, focus on open source contributions on GitHub. This demonstrates that you can build real projects and know how to use a popular version control system.

Summary: Build things with Go to learn skills and create a solid portfolio of work.

Step 6: Practice Go Coding Interview Questions

Once you have a solid portfolio, you can start practising Go interview questions. This will help you prepare for interviews and learn more about the language you’ve just learned. Coding interview questions are not the be-all, end-all since they tend to be abstract, but they can really improve your code and help you work under pressure.

When you get a Go developer interview, you’ll be expected to answer these questions in time, so getting practice early on can’t hurt! It’ll also help reveal any gaps in your knowledge.

Some common questions include:

  • What is a goroutine? How do you stop it?
  • How do you check a variable’s type at runtime?
  • How do you format a string without printing?
  • How do you concatenate strings in Go?
  • What is Go 2?
  • How do you initialize a struct in Go?
Summary: Practice real coding questions to prepare for interviews and fill any knowledge gaps.

 

Most-Read Articles

10 Tips To Become A Better Software Engineer

2nd April, 2021

Practical advice from a programmer with more than 12 years in the field.

Read more

How To Become A Golang Developer: A 6-Step Career Guide

6th April, 2021

Go is an in-demand language across the board. Here are the steps to become an employable and modern Go developer.

Read more

5 Most Asked Qs In The Amazon Software Engineer Interview

11th June, 2021

Analyzing over 1,300 personal experiences of those who’ve gone through the process.

Read more

World-class articles, delivered weekly.