All tagged slice

Functional programming in Go

Thanks to generics, there are some interesting new ways to program in Go. This article explains how we can use functional programming techniques like Map, Filter, and Reduce, and what kind of problems they might help us to solve.

Iterating over a Golang map

How do you iterate over Golang maps? How do you print a map? How do you write a for loop that executes for each key and value in a map? What is the iteration order of Go maps? Let's find out, in this practical, easy-to-follow tutorial.

Go maps: declaring and initializing

What is a Golang map? Why is it useful? How does it compare to a slice? How do you declare a map? How do you initialize a map in Go? Fear not, all these questions are answered in this friendly introduction to one of Go’s most powerful features.