[57] Results

Golang : How to split or chunking a file to smaller pieces?

golang split-file chunk big-file

Problem :

You have a big file and you want to split / chunk the file into smaller pieces. How….... read more


Golang : Recombine chunked files example

golangrecombine-file split-file chunk big-file

Problem :

You use the previous tutorial on how to split or chunk a big file into smaller….... 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

Problem:

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


Golang : Split string

golang split-string

Problem :

Need to split this string ADAM, EVE, CALEB, SCOTT, GRANTT, JAMES by comma

Solution :

Use the….... read more


Golang : Find the shortest line of text example

golang shortest-line strings-split

Continue from previous tutorial on how to find the longest line in a given text. This example demonstrates how to….... read more


Golang : Find the longest line of text example

golang line-break word-wrap longest-line strings-split

Ability to find the longest find in a given text file can be useful in a situation where you want….... read more


Golang : get the current working directory of a running program

golang executable file-path

Problem :

You are looking for way to get the folder/directory of the running program.

Solution :

Use https://bitbucket.org/kardianos/osext.... read more


Golang : Check to see if *File is a file or directory

golang file directory

Sometimes, we need to write codes that is robust and flexible enough to handle different situation. For example, if a….... read more


Advertisement