In this tutorial I'll demonstrate how to send a file in Go over a TCP connection using a server that sends the file and a client that receives it, I'll try to go into detail as much as possible.
You can download the source code here.
Comments and remarks are more than welcome.
In Golang there isn't a native function to convert a character number (!= int number) to int.
An int in bytes is the normal sequence of 0-9 normally, but when you are dealing with number characters, they start of at number 48 (in the ASCII table)
So a character 0 is 48 in bytes, 1 is 49, 2 is 50, and so on...