Tutorials
Golang : Convert file content to Hex
Somehow for the last couple of days I keep on thinking about my childhood days of hacking DOS games with….... read more
Get file path of temporary file in Go
There are time when we need to know the exact file path of a temporary file. This is a a….... read more
Golang : Create Temporary File
Need to create a temporary file in Go? Easy. Below is the code in Go for creating a temporary file
….... read moreCreate directory in Go
In this short tutorial, we will learn how to create directory in platform independent manner. I.e we don't worry about….... read more
Golang : Convert file content into array of bytes
It is a fairly common requirement to read a file content into array of bytes and output those arrays back….... read more
Generate checksum for a file in Go
With billions of files being downloaded and transferred across Internet everyday. Generating checksum is important component in proramming today to….... read more
Golang : Get current file path of a file or executable
Getting a file path in Golang is not that straight forward with just a single function call. In this tutorial,….... read more
Golang : Get file last modified date and time
In this tutorial, we will learn how to get a file last modified date and time with Go. Getting the….... read more
Golang : Change a file last modified date and time
There are times when we need to perform some operation on a file, but then manually change the last modified….... read more
illegal rune literal
Problem : While writing out Go codes for tutorial today I came across this error message for the first time….... read more
Responsive Google Adsense
Problem :
Google Adsense have several recommended ads sizes for publisher to put on their website. However, these ads recommended….... read more
Golang : Get current time
Problem :
Need to get current time stamp in Go and display in string.
Solution :
Use the time.Local() and….... read more
Golang : Create File
Any sane programming language should have the basic File I/O functions. Luckily Go is one programming language in the sane….... read more
Golang : Move file to another directory
So far, Go does not have a function to directly move file to different folders. We have to provide our….... read more
Golang : Delete files by extension
Being able to select certain type of files to delete can be useful. In this follow up tutorial from .... read more
Golang : Rename file
No File I/O operations will be complete without the capability to rename file.
Renaming a file in Go is….... read more
Golang : Find files by extension
This is a filepath.Ext()
function example and it will only display files with .png
extension in the current directory. You….... read more
Golang : Write file with io.WriteString
Writing to a file in Golang is easy. There are couple of ways to do it. In this tutorial, we….... read more