Go Logging

If you write software that runs in production, you likely want to include logging. You could use fmt.Println but I strongly recommend against it. Go has a dedicated, built-in log package. In addition, there are third-party packages offering more features and better performance. Let’s dive into Go logging! Introduction to Logging Before delving into the … Read more

Go Defer Statement: What It Is And When To Use

The Go defer statement allows you to schedule a function to be called immediately before the surrounding function returns. If you are familiar with Python, you probably know about Python’s with statement. The goal of this construct is never to forget freeing or closing resources. The Go defer statement was added to Go for precisely … Read more

Go For Loop: One Loop To Rule Them All

Loops are an important concept in programming, and Go has several options for looping through code. Unlike other programming languages, Go only has one keyword to create a loop: for. That doesn’t mean Go has just one type of loop, though. In this article, we’ll explore four ways of looping in Go: for loops, while … Read more

Go Tutorial For Beginners

Go Tutorial

Welcome to the Go Tutorial for beginners at Go-Tutorial.com! This tutorial teaches you to program in the popular Go programming language, sometimes abbreviated as Golang. It’s written for beginners, but those with previous programming experience will feel right at home as well. Can I use this Go tutorial as a complete beginner? Yes, you can! … Read more