[68] Results

Golang : Skip or discard items of non-interest when iterating example

golang read-file skip-iterable-item strings-index


You want to skip or discard items of non-interest when iterating. For example, skipping the commented lines with #.... 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 : Read a text file and replace certain words

golang read replace

Problem :

You have a text file with some words that you need to replace with another word.

Solution :

.... read more

Golang : Compound interest over time example

golang compound-interest formula read-float read-integer

It is time for me to do something "lighter" now.... such as investing rather than heavy duty programming ..... so….... read more

Golang : bufio.NewReader.ReadLine to read file line by line

golang bufio-newreader read-line

In the previous tutorial on how to read file line by line with bufio.NewScanner() example. The previous example….... read more

Golang : simulate tail -f or read last line from log file example

golang tail offset read-at

In this tutorial, we will attempt to simulate the Linux/Unix tail command with -f option in Golang. What this code….... read more

Golang : How to read float value from standard input ?

golang read-integer standard-input

This is a continuation from previous tutorial on how to read integer value from standard input. For this tutorial, we….... read more

Golang : Change file read or write permission example

golang write-permission read-permission change-permissions

Problem :

You have a file and you need to change a file read, write or execute permission. How to….... read more