[20] Results

Golang : Copy directory - including sub-directories and files

golang copy-directory

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

Golang : Copy file

golang copy

Here’s an example to copy a file named “input.txt” to another file named “output.txt”. Copying files can be done in several ways in Go. The….... read more

Golang : Get path name to current directory or folder

golang current-directory

Problem :

You need to get the path name of the current directory where the executable is residing. How to….... read more

Golang : Check to see if *File is a file or directory

golang file directory

Sometimes, we need to write codes that is robust and flexible enough to handle different situation. For example, if a….... read more

Golang : Delete certain files in a directory

golang delete directory

Encounter a situation today where I need to delete some files in a directory. Not all files, but some files….... read more

Golang : Check if a directory exist or not

golang directory

In this short tutorial, we will learn how to check if a parameter passed as argument is directory or not. It is pretty straight forward….... read more

Golang : Copy map(hash table) example

golang copy-map


You have a map and you want to copy the elements to another map. How to do that ?

.... 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