Tutorials

golang.pngGolang : Concurrency and goroutine example

19th December 2014

Golang has concurrency build into the core design and this is one of the main features that attracted many veteran….... read more



golang.pngGolang : Check if os.Stdin input data is piped or from terminal

18th December 2014

There are times we need to write a program that need to behave in one way according to input from….... read more



golang.pngGolang : Read file and convert content to string

18th December 2014

Problem :

You want to read a file content and convert the content into string.

Solution :

Read the file….... read more



golang.pngGolang : Sort and reverse sort a slice of integers

18th December 2014

Problem :

How to sort and reverse sort a slice of integers ?

Solution :

Use sort.Ints and sort.Sort functions.….... read more



golang.pngGolang : Sort and reverse sort a slice of runes

18th December 2014

Problem :

How to sort and reverse sort a slice of runes ?

Solution :

Sorting runes depends on the….... read more



golang.pngGolang : Sort and reverse sort a slice of bytes

18th December 2014

Problem :

How to sort and reverse sort a slice of bytes ?

Solution :

Import "github.com/cznic/sortutil"

Use the ByteSlice….... read more



golang.pngGolang : convert rune to unicode hexadecimal value and back to rune character

18th December 2014

There are times when we need to convert a rune to unicode hexadecimal style for storage purpose, encryption, manipulation and….... read more



golang.pngGolang : Sort and reverse sort a slice of floats

18th December 2014

Problem :

How to sort and reverse sort a slice of floats ?

Solution :

Declare the slice type as….... read more



golang.pngGolang : How to reverse elements order in map ?

17th December 2014

There is no built in function in Golang that allow you to reverse the elements order in a map, but….... read more



golang.pngGolang : Sort and reverse sort a slice of strings

17th December 2014

Sometimes we will want to sort or reverse sort a collection of strings alphabetically. It is pretty easy to sort….... read more



golang.pngGolang : Check if element exist in map

17th December 2014

Key based element search on a map is the most frequent method use to retrieve the associated value. However, there….... read more



golang.pngGolang : How to delete element(data) from map ?

17th December 2014

Problem :

You need to delete some elements from a map.

Such as:

cities := map[string]string{ "city1":"New York", "city2":"Adelaide"….... read more



golang.pngGolang : Copy directory - including sub-directories and files

17th December 2014

Another day, another tutorial....ok...we will learn how to copy all the content of the directory to another directory with Go.….... read more



golang.pngGolang : untar or extract tar ball archive example

16th December 2014

Many system administrators like to use the tar program to archive the entire directory and gzip to compress newly created….... read more



golang.pngGolang : Archive directory with tar and gzip

16th December 2014

In the previous tutorial, we learn how to extract files from tar ball and deal with gzipped tar….... read more



golang.pngGolang : How to GOTO ?

16th December 2014

In this tutorial, we will learn how to use goto keyword in Golang. It has been a while since I….... read more



golang.pngGolang : Generate thumbnails from images

16th December 2014

After learning how to resize images and crop images with Golang. We will learn how to….... read more



macosx.jpgUnix/Linux : How to open tar.gz file ?

15th December 2014

It has been a while since I touched tar files( have been using Mac for long time) and couple of….... read more



Advertisement