[17] Results

Golang : Forwarding a local port to a remote server example

golang port-forwarding tcp-net io-copy remote-server

Got a strange request yesterday. A friend who is an IT manager in his company needs to implement some control….... 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 : 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 : Convert(cast) io.Reader type to string

golang convert type-cast io-reader string

Problem :

You have input of type io.Reader and you need to convert the input to string type.

Solution :

.... read more

Golang : Characters limiter example

golang character-limiter io-readatleast


You want to limit a string to X number of characters. How to do that?


Use io.ReadAtLeast() function….... 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 : 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

Unix/Linux : secure copying between servers with SCP command examples

unix-linux scp secure-copy remote-server

Have to write this down in case I forget again and hope you may find these SCP examples useful too.

.... read more