Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with additional content for other programming languages)

file handling

Tag

Cheat Sheet for the Vim Text Editor: Commands and Keys

The Vim text editor running on the Windows operating system.

Not everyone likes to write code using impressive IDEs. Many experienced programmers prefer to use the old-school Vim text editor, which runs natively in the Linux terminal. There are also versions available for Windows and MacOS. Although Vim has a reputation for being intimidating to new users, it offers an incredible degree of control and […]

How to Check Whether a File Exists or Not With Go

There is no single function in the Go standard library that will return a boolean value set to true if a given file or directory exists, based on a given path, or false if it doesn’t. Some people may argue that such a function should have been provided, especially since other popular programming languages have […]

How to Read a File Line by Line

Sometimes you want to read a file that contains many lines of text or a list of structured data and you want to process each line individually, rather than working with the entire content of the file at once. This post will discuss various ways to read a file line by line, looking first at […]