Building Applications in GoLang

Building applications for different platforms is one of the most important things out there. Go has very strict policies on how it can be done. In this post, we are learn how to build a GoLang application. GOOS and GOARCH The GOOS and GOARCH define the OS and architecture for current program. When we output …

Building Applications in GoLang Read More »

Using MongoDB with GoLang

MongoDB is one of the most used NoSQL database out there. It is also a very new database. In this post, we are going to use MongoDB alongside GoLang to create CRUD system. Installing MongoDB To download MongoDB head over to mongodb.com and hover over the software menu and click on the community server and …

Using MongoDB with GoLang Read More »

GoLang PostgreSQL Example

PostgreSQL is as much popular as MySQL and provides similar features. It also comes with some of the best techniques readily available out of the box. In this post, we are going to discuss PostgreSQL in GoLang and create simple CRUD operations in Go. Installing PostgreSQL Installing PostgreSQL is pretty straightforward, clicking on the download …

GoLang PostgreSQL Example Read More »

Using GoLang with Docker

Docker is a containerization platform widely used today. Containers enable us to do things easily that was previously a hassle to do. In this post, we will containerize a simple Go application using docker. What is Docker? Docker is an OS-level virtualization platform that containerizes its data files and packages and isolates from other containers …

Using GoLang with Docker Read More »

The flag package in GoLang

Flags are an important aspect of CLI applications. They are provided while running the program so that the program runs with the correct parameters. In this post, we will explore the flag package and what it offers. What are the flags? When we run a program, we can pass various parameters to the executable. If …

The flag package in GoLang Read More »

The bufio package in GoLang

The bufio package provides a buffered I/O in GoLang. This post provides some examples of how to use buffered I/O in GoLang. Why buffer I/O? The IO operation in computer costs resources, especially system calls. So, we need to be more considerate when doing things like that. The write operation to a file, if done …

The bufio package in GoLang Read More »

The test functions in GoLang

In this post, we will discuss some ways we can create test functions in Go. Test functions are essential but it not always obvious how we can run tests in a better and efficient way. Writing the same code over and over again can take a huge amount of time. This post aims to provide …

The test functions in GoLang Read More »

Tar and gzip in GoLang

In this post, we are going to take a look at how to tar and untar files and how to zip and unzip using gzip in GoLang. What is tarring and gzipping? The tar is an archive which joins all the file together into a tar file. It is an archiving algorithm. The gzip function, …

Tar and gzip in GoLang Read More »

Profiling in GoLang

Profiling is an important task that cannot be avoided for larger applications. Profiling helps us understand CPU and memory intensive code and helps us write better code for optimization. In this post, we are going to take a look at the pprof package which helps us do the profiling in Go. What is profiling? Profiling …

Profiling in GoLang Read More »

Logging in Go using logrus package

Logging is an important task that needs to be done properly when creating large software. It is almost essential in enterprise-level software creation. In this post, we will discuss the logrus package. It’s an external logger package for GoLang. Installing logrus To install logrus we need to run this command from the terminal: This command …

Logging in Go using logrus package Read More »