[56] Results

Golang : Delete duplicate items from a slice/array

golang duplicate slice array

Problem :

Fairly common question or task that a programmer will face from time to time. How to remove duplicate….... read more

Golang : How to count duplicate items in slice/array?

golang count-duplicate slice array

Problem :

You need to count the number of duplicate items in a slice or array.

Solution :

Pseudo-code :….... read more

Golang : Convert slice to array

golang slice array convert copy

For new comer to Golang, slice and array can be confusing sometimes. In a nutshell, a slice length(size) is flexible….... read more

Golang : Find commonalities in two slices or arrays example

golang common-item slice array


You have two slices of the same length and you want to find out if they have similar/common items.

.... read more

Golang : How to shuffle elements in array or slice?

golang shuffle array slice elements

Problem :

You have an array or slice with elements in natural order and you want to shuffle the elements.

.... read more

Golang : Convert string to array/slice

golang convert string array slice

Just a note for my own self. Hope it will be useful for you.

Problem :

You have a string….... read more

Golang : Shuffle array of list

golang shuffle array slice list map

Continue from previous tutorial on how to shuffle an array of strings, to shuffle array of list is….... read more

Golang : Check if item is in slice/array

golang duplicate item-in-slice array

Problem :

You need to see if an item is inside a slice or array.

Solution :

Golang does not….... read more