Go

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