Go

How To Run Multiple Functions Concurrently in Go — step-by-step Programming tutorial on Progressive Robot

How To Run Multiple Functions Concurrently in Go

To run programs faster, a programmer needs to design their programs to run at the same time. Two features in Go, goroutines and channels, make concurrency easier when used together. Goroutines solve the difficulty of setting up and running concurrent code in a program, and channels solve the difficulty of safely communicating between the code running concurrently.

Read more
How To Use Interfaces in Go — step-by-step Programming tutorial on Progressive Robot

How To Use Interfaces in Go

In this article, we will learn how to compose custom types that have common behaviors, which will allow us to reuse our code. You’ll also learn how to implement interfaces for your own custom types that will satisfy interfaces defined from another package.

Read more
How To Use Variables and Constants in Go — step-by-step Programming tutorial on Progressive Robot

How To Use Variables and Constants in Go

Variables are an important programming concept to master. They are symbols that stand in for a value you’re using in a program. This tutorial will cover some variable basics and best practices for using them within the Go programs you create.

Read more
Como escrever pacotes em Go — step-by-step Programming tutorial on Progressive Robot

Como escrever pacotes em Go

Um pacote é composto por arquivos em Go que ficam no mesmo diretório e têm a mesma instrução de pacotes no início. Você pode incluir funcionalidades adicionais dos pacotes para tornar seus programas mais sofisticados. Alguns pacotes estão disponíveis através da Biblioteca Padrão de Go e, por…

Read more
Understanding defer in Go — step-by-step Programming tutorial on Progressive Robot

Understanding defer in Go

Go has many of the common control flow keywords found in other programming languages such as if, switch, for, etc. One keyword that isn’t found in most other programming languages is defer, and though it’s less common you’ll quickly see how useful it can be in your programs. In this article we will learn how to properly use the defer statement for cleaning up resources as well as several common mistakes that are made when using defer.

Read more
Understanding Pointers in Go — step-by-step Programming tutorial on Progressive Robot

Understanding Pointers in Go

When writing software in Go you’ll be writing functions and methods. You pass data to these functions as arguments. Sometimes, the function needs a local copy of the data, and you want the original to remain unchanged. In this article, you will learn how to create and use pointers to share access to the memory space for a variable.

Read more
Personalizando binários em Go com build tags — step-by-step Programming tutorial on Progressive Robot

Personalizando binários em Go com build tags

No Go, um build tag, ou uma restrição de compilação, é um identificador adicionado a um pedaço de código que determina quando o arquivo deve ser incluído em um pacote durante o processo de build. Isso permite que você compile diferentes versões de seu aplicativo em Go a…

Read more
Handling Errors in Go — step-by-step Programming tutorial on Progressive Robot

Handling Errors in Go

Robust code needs to react correctly to unexpected circumstances like bad user input, faulty network connections, and failing disks. Error handling is the process of identifying when your program is in an unexpected state, and taking steps to record diagnostic information for later debugging.

Read more
CHAT