[86] Results

Golang : Replace a parameter's value inside a configuration file example

golang update-file change-configuration replace-file-content-by-line

Alright, putting this here for my own future reference. In this tutorial, we will explore how to read in a….... read more

Golang : Read a file line by line

golang read-file line-by-line

Got another newbie to Golang asking me for help today on how to read a file line by line. The….... read more

Golang : How to remove certain lines from a file

golang remove-by-line file data-processing read-text-file

Alright, here is a simple tutorial on how to remove certain lines of data from a file. There are times….... read more

Golang : Read a file into an array or slice example

golang read-file slice array line-by-line

Ok, got a junior developer that wants to know how to read a text file content line by line into….... read more

Golang : Display a text file line by line with line number example

golang read-text-file line-by-line strings-split ioutil-readfile


Instead of using cat or more commands to display a text file line by line. You want to display….... read more

Golang : How to tell if a file is compressed either gzip or zip ?

golang detect-file-content zip unzip

Sometimes it is good to check if a file is really in compressed form or not by examining the actual….... read more

Golang : Perform sanity checks on filename example

golang file-upload sanitize filename replace


Your Golang application accepts files uploaded by visitors. However, you want to sanitize the uploaded filenames for security purpose.….... read more

Linux/MacOSX : Search and delete files by extension

linux mac-os-x delete-file by-extension

Continuing from previous tutorial on how to search for files by extension with find command. For this post,….... read more