An enum (short for enumerator), is a set of named constant values. An enum is a powerful tool that allows developers to create complex sets of constants that have useful names and yet simple and unique values.
I can’t begin to tell you how often I split strings in Go. More often than not I’m just parsing a comma-separated list from an environment variable, and Go’s standard library gives us some great tools for that kind of manipulation.
For loops are a programmer’s best friend! They allow us execute blocks of code repeatedly and iterate over collections of items.
If you’ve already read my previous post, you know that the amqp package is awesome and you can get up and running with just 40-50 lines of simple code.
Golang has skyrocketed in popularity year over year, making it one of the best choices for career-conscious developers to learn.
If you’re asking “should I commit the vendor folder in my Go project to Git?”, the answer is “almost always”.
Want to learn Go fast? The good news is that Go is one of the simplest programming languages out there.
I lead a team that’s responsible for anywhere from 15-25 Go microservices at any given time.
We’ve recently made big changes to how we execute Go in the browser on boot.dev and want to explain the enhancements.
Pure functions are often hyped up in the JavaScript world, probably because of the abundance of stateful front end applications.
In this tutorial, we’ll go step-by-step through building a video streaming API (which will work for music as well) in Go.
In Go, we often need to return zero values. Idiomatic Go encourages the use of guard clauses, and guard clauses necessitate the need to return early.
Let’s take a look at some good technical questions to be familiar with, whether you are looking to nail your next Golang interview, or if you’re the interviewer yourself.
While working on boot.dev’s Go Playground, I came across a very strange error. The standard library’s fmt.
Users love convenience. If your goal is to make it easy for users to register with your app or website, then implementing the “Sign in with Google” option should be at the top of your priority list.
Rust and Go are two of the industry’s biggest successes when it comes to developing modern programming languages.
If you are familiar with the Go Playground, then you know how convenient it is to be able to have a Go scratchpad in the browser.
There are quite a few ways to create new maps and slices in Go, for example, they can both be initialized using the make() function, the new() function, as literals, or by using the var keyword.
In applications that are i/o heavy, it can get clunky to synchronously execute high-latency functions one after the other.
Sorting is a common task in programming, and for that reason, most languages have a default sorting algorithm in their standard library.
Go is strongly typed, and with that, we get many options for simple variable types like integers and floats.
Go and Rust are two of the hottest compiled programming languages, but which is more popular, Go or Rust?
The Go standard library has a really cool type - Ticker. Tickers are used when you want to do something at a regular interval, similar to JavaScript’s setInterval.
In microservice architectures, it’s fairly common to have a project that includes different worker types. A Makefile can be used to manage the creation of multiple programs, but the Go toolchain has a tool that can be used as well, go generate.
An anonymous struct is just like a normal struct, but it is defined without a name and therefore cannot be referenced elsewhere in the code.