Sitemap
CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Starting with Go? Here Are 5 Things You’ll Be Glad to Know

A collection of five Go concepts to support your journey

6 min readSep 10, 2025

--

Go has quickly become one of the most popular programming languages thanks to its balance of performance, simplicity, and ease of learning.

But like any language, some concepts can be tricky at first or simply not obvious when you’re just getting started.

In this article, I’ll share five things that I wish I had known at the beginning of my Go journey, which could help you to avoid common mistakes and enjoy a smoother experience.

Press enter or click to view image in full size
Image by Christopher Kuszajewski from Pixabay

Interface variables and switch type assertion

One of the strangest concepts when I started working with Go was that of the empty interface.

Although they allow you to receive anything as input, you still have to cast it to a specific type afterwards.

Handling all possible cases can be cumbersome, so I usually preferred different functions with concrete types to a single general function with interfaces and lots of conditions.

However, once I started to understand the power of Go’s interface approach, everything changed, and the switch assertion became one of the most useful things I had ever seen.

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Francesco Pastore
Francesco Pastore

Written by Francesco Pastore

Passionate about Go, cybersecurity, and building secure software. Engineering student in Milan.

No responses yet