Hi there 馃憢

I’m a software engineer working remotely from Poland and writing code in Ruby language. Here (on my blog) I write about things I have learned recently.

Strings, Bytes and Runes in Go

Working with text data is the fundamentals of programming, and understanding how Go handles strings is rather recommended. This post covers strings, bytes and runes in Go, explaining their differences and demonstrating elementary work with them. Strings A string is an immutable sequence of bytes which means we can store there whatever we want, but in most cases it is used to represent sequence of human readable characters. In order to define a string literal we use double quotes like this:...

July 26, 2024 路 4 min 路 Agata Werszler

Zero Values

Golang provides the mechanism to set default values for declared variables. How does it work? When we declare a variable without explicit initialization, Golang will allocate memory for such a variable by setting a zero value for it. var var1 bool var var2 int var var3 float64 var var4 string var var5 *int var var6 []int var var7 map[int]string Let鈥檚 see what values are set for the particular variables listed above:...

April 9, 2023 路 2 min 路 Agata Werszler