Go

How to Add Extra Information to Errors in Go — step-by-step Programming tutorial on Progressive Robot

How to Add Extra Information to Errors in Go

In Go 1.13, new features were added to make it easier to add extra information to errors: fmt.Errorf, errors.Is, and errors.As. In this tutorial, you’ll create a program that uses these functions to include additional information in errors returned from your functions, and then create your own custom error struct that supports the wrapping and unwrapping functionality.

Read more
Cómo manejar panics en Go — step-by-step Programming tutorial on Progressive Robot

Cómo manejar panics en Go

Los errores que un programa encuentra se dividen en dos categorías generales: los que el programador anticipa y los que no anticipa. La interfaz error que abarcamos en nuestros dos artículos anteriores sobre el [manejo de…

Read more
Cómo usar variables y constantes en Go — step-by-step Programming tutorial on Progressive Robot

Cómo usar variables y constantes en Go

Las variables son un concepto de programación que es importante dominar. Son símbolos que sustituyen valores que se usan en un programa. En este tutorial, se abarcarán algunos aspectos básicos de variables y las prácticas recomendadas para utilizarlos en los programas de Go que cree.

Read more
Конвертация типов данных в Go — step-by-step Programming tutorial on Progressive Robot

Конвертация типов данных в Go

В Go типы данных используются для классификации одного конкретного типа данных, определяя значения, которые вы можете присвоить для этого типа, а также операции, которые вы можете с ними совершать. При программировании бывают случаи, когда вам требуется конвертировать значения…

Read more
Импорт пакетов в Go — step-by-step Programming tutorial on Progressive Robot

Импорт пакетов в Go

Иногда для вашего кода могут потребоваться дополнительные функции вне текущей программы. В подобных случаях вы можете использовать пакеты, чтобы сделать программу более функциональной. Пакет представляет собой все файлы в одном каталоге на диске. Пакеты могут определять функции,…

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
Cómo usar el paquete flag en Go — step-by-step Programming tutorial on Progressive Robot

Cómo usar el paquete flag en Go

Los servicios de línea de comandos rara vez son útiles cuando vienen listos para usar sin configuración adicional. Es importante disponer de buenos valores predeterminados, pero las utilidades prácticas deben aceptar la configuración de parte de los usuarios. En la mayoría de…

Read more
CHAT