Eduardo Zepeda's latests posts
Go: race conditions on goroutines and mutexes
- go
In past posts I talked a bit about goroutines, deadlocks and channels. But there is another quite interesting issue about goroutines that stands out when we use asynchrony and there are many functions accessing data at the same time and. Multiple functions reading and writing the...
Read more
Go: channels, understanding the goroutines deadlocks
- go
When working with channels there is a quite common error that occurs when you are not familiar with the concepts, the error is fatal error: all goroutines are asleep - deadlock!. The first time I saw this error I was perplexed and, although I knew how to fix it, I didnt understan...
Read more
Go: use of channels to communicate goroutines
- go
So far I have explained how to run a goroutine, execute code concurrently with the goroutines and wait for them to finish executing but our goroutines cant do anything else, they cant cooperate with each other to speed up the processes.Imagine you have a web scrapper that gets da...
Read more
Go: introduction to goroutines and concurrency
- go
As I mentioned in the introduction to the go programming language: go is a specialized concurrency language. It is a language that was designed to handle multiple tasks asynchronously. This entry is about go channels. (adsbygoogle = window.adsbygoogle || []).push({}); ...
Read more
Go: package import and module management
- go
In go you can consider a package as all the files contained in a directory and a module as a collection of packages. To use the code of a package we need to import it, however, in Go there are no relative module imports. Before Go 1.8, to import packages (there were no modules) i...
Read more
Go: Structs, inheritance, polymorphism and encapsulation
- go
As I already mentioned to you in the introduction to Golang or Go programming language, this language does not have a reserved word for dealing with classes, it still mimicks some behavior, were going to see how to handle golang inheritance, golang polymorphism and of course enca...
Read more
Golang runes strings and bytes explained
- go
In this entry I will briefly explain the basics of how golang runes, strings and bytes work in go, and even a little bit of utf-8 just to spice things up.To explain the topic I will assume you know the basics of slices and data types in go, if you dont know about these topics vis...
Read more
Golang maps or dictionaries
- go
In the go programming language, a map or hash table is the equivalent of a dictionary; they have a key that is related to a value. The key and value can be of different data types, but all keys must be of a single type and all values must be of the same type. Hey! did ...
Read more
Go: slices and arrays, basic characteristics and most common uses
- go
In go or golang slices, arrays and maps are structures for handling data collections. In this entry I am going to talk about the first two: slices and arrays.In this entry I am going to use data types, zero values, and other very basic aspects of go. If you dont know what Im talk...
Read more
Go: loops for, break, continue, defer, if and else
- go
This entry will deal with loops in the go programming language. Hey! did you know that I wrote a completely Free Go programming language tutorial?, click here to read it itGo handles loops a little differently than what you are used to. If youre already fluent in any o...
Read more