Antony Shikubu

Antony Shikubu

Systems Integration Engineer

Articles by Antony Shikubu

Golang JWT Authentication (Gin + REST API + Middleware Examples)

Learn how to implement JWT authentication in Golang using Gin and PostgreSQL. This step-by-step guide covers user signup, login, JWT token generation, …

Golang If Else (Syntax, Multiple Conditions, One-Line & Best Practices)

Learn how to use if, else if, and else statements in Golang with practical examples. This guide covers multiple conditions, logical operators (AND, OR, NOT), …

Golang Optional Parameters (No Default Values? Best Workarounds Explained)

Learn how to implement optional parameters in Golang using variadic functions, struct-based patterns, and pointer parameters. This guide explains why Go does …

Golang Generics Explained (Functions, Structs, JSON & Real Examples)

Learn Golang generics with practical examples including generic functions, structs, interfaces, and JSON parsing. This guide explains type parameters, …

Golang Write to File, Append & Create File (os.WriteFile, OpenFile Examples)

Learn how to write, append, and create files in Golang using os.WriteFile and os.OpenFile. This practical guide covers file writing, appending data, creating …

Hexagonal Architecture in Golang: Project Structure, Example & Best Practices

Learn Hexagonal Architecture in Golang with a real-world example, project structure, and best practices. Understand ports and adapters, dependency flow, testing …

Golang Flag Examples (CLI Flags, Multiple Values, Subcommands)

Learn how to use the Golang flag package with practical examples. This guide covers Go CLI flags, multiple values, required flags, subcommands, and real-world …

Use GO Gorilla Mux Like a PRO: Don't be a Rookie!

In this tutorial, we will cover Golang's Gorilla Mux in detail, exploring its setup, RESTful API development, routing techniques, database integration,

Master Golang Gin Module [Explained with Examples]

Explore the transformative power of Golang Gin in web development. This guide offers insightful tips, best practices, and innovative strategies to elevate your …

Create RESTFul CRUD API using Golang Fiber [Tutorial]

Step by Step instructions to create a RESTFul API to perform CRUD Operations using golang fiber with examples

Go Pointers Explained for Beginners [Practical Examples]

Go pointers are magical in that they allow us to get access to different memory addresses easily. Go pointers also allow us to change the value of a variable

Golang Concurrency Explained with Best Practices

The best practices of using golang concurrency with examples and best practicies. gorutine leak, atomic, mutex, waitgroup

Optimize Golang Docker images [Multi-Stage Build]

You have built your application and it's now time to package and deploy your application to the cloud so that everyone can use it. But how would you package

Goroutines Complete Tutorial Explained in Layman's Terms

Getting started with goroutines in golang, Create one or multiple go routines. Add time.Sleep and sync.WaitGroup to goroutines to wait for it complete. Enable …

Golang defer keyword - How & When to Use it?

golang defer keyword can be used to close open files, close open connections, waitgroups, methods and functions

Golang Methods Tutorial [Practical Examples]

Complete tutorial guide on golang methods, golang receiver function, go struct methods, how to call a method in golang, golang method pointer

Using golang function like a PRO [Practical Examples]

Just like any other function, an anonymous golang function is called by using parenthesis.

Building a CRUD REST API using Redis DB in GO

Go or Golang is an open source programming language developed and supported by Google. It is mostly used to build backend applications where it interacts with

Create AWS DynamoDB CRUD API in Golang [SOLVED]

Step by step instructions to create a CRUD based REST API using AWS DynamoDB in Golang

Building a CRUD gRPC API using Postgresql DB in GO

CRUD is an acronym that refers to operations that are considered necessary to implement in a persistent storage application: Create, Read, Update and Delete.

Master Golang Enum Techniques: Don't be a Rookie

Explore the dynamic world of Golang Enum. Unearth powerful strategies, avoid common pitfalls, and harness the full potential of enums to enhance your code's …

Golang gRPC In-Depth Tutorial [Create Server & Client]

In this Golang gRPC tutorial we will create a proto file, a server and client application

Building a CRUD REST API using Postgresql DB in GO

CRUD is a common abbreviation when it comes to getting started with any framework or programming language. CRUD basically stands for Create, Read, Update and

Go comma ok idiom - How & When to Use?

The Go comma ok idiom is mostly used to Test for error on a function return, Testing if a key-value item exist in a Go map, Testing if an interface variable is …

Golang FIFO Tutorial With Examples

Read and Write into a FIFO File. EOF handling. Examples to create a reader and writer using FIFO.

Golang channel with multiple receivers [SOLVED]

Reading from a single channel shared with multiple goroutines is concurrency in action. Concurrency in Go is the ability for a goroutine(s)(function) to run

Golang Global Variables Explained [Beginners Tutorial]

golang global variables across packages, golang global variable initialization, golang global variable across files, golang global variables best practices, …

Go Channels Complete Tutorial Explained in Layman's Terms

why use channels in golang, go channel select, go channel close, golang read from channel, golang count items in channel, golang channel blocking, golang …

Go Fan Out Fan In Concurrency Pattern Explained

In this tutorial we have explained the usage of golang concurrency patterns i.e. fan out and fan in using different examples

How to use Golang as Redis Client? [SOLVED]

In this article we assume that you already have a working Redis Server. We have already covered the steps to install and configure Redis on Rcky Linux 9. You

Golang Logrus Complete Tutorial with Examples

Using golang logrus to print messages on console, logfile, multi writer. Format the log output with custom log level. Change log output format. Change timestamp …

GO environment variables [Best Practices]

Go environment variables include os.Setnev(), os.Getenv(), os.LookupEnv(), os.Unsetenv(), godotenv (.env) file.

Golang for loop with Struct, Maps, Strings, Interfaces, Channels

How to use and syntaxd of golang for loop, Looping through Maps, Looping through slices, Looping through strings, Looping through interface, Looping through …

Golang Zap Logger & SugaredLogger Tutorial

Dive into zap - Go's fast and structured logging solution. Explore its two logging paradigms, learn how to dynamically set log levels, format outputs, handle …

Golang WaitGroup Explained: Masterclass in Concurrency

golang waitgroup multiple wait, golang waitgroup timeout, golang waitgroup limit, golang waitgroup error handling

Golang struct Tutorial [Practical Examples]

When you declare a struct without field values, we say that it is a zero value struct. A zero value golang struct has its corresponding field values set to

Golang interface Tutorial [Practical Examples]

golang interface, go interface, interface golang, interfaces in golang, interface in go, golang interface type, golang interfaces

Golang break and continue [Practical Examples]

Different examples to use golang break and continue statement in functions

How to change logging format of log module in GO

The above code prints out the results on the console with default logging format. Below is the result after executing the code. Output

Master Docker and Golang Usage with Best Practices

Unlock the potential of containerization in your development workflow with our powerful Docker and Golang tutorials. Elevate your coding expertise, conquer …

Golang Testing Examples | How to test GO Code?

Step by Step instructions to understand golang testing and write unit tests in go code.

Golang Constructor Tutorial

we learn about Go constructors. Go does not come with constructors natively but provides ways to construct new types. Constructor functions are ordinary …

Golang Trim Strings [Left, Right, Space, Suffix, Prefix]

golang trim strings function using strings.Trim(), strings.TrimLeft(), strings.TrimRight(), strings.TrimSpace(), string.TrimSuffix(), strings.TrimPrefix()

Set GOPATH Variable in Linux & Windows PROPERLY

Steps to modify or set GOPATH variable in go env in both Linux and Windows. Make the changes permanent (persistent)

Golang Mutex Tutorial [Lock() & Unlock() Examples]

Learn all a about golang mutext with practical examples. How to add mutex lock and unlock in go code. Using sync.RWMutex, that allows multiple readers to hold …

[SOLVED] Using golang while loop with Examples

golang while true, golang while loop example, golang infinite loop, golang while loop through structs, maps, interface. golang while loop through slice, arrays, …

Golang Maps Explained in layman's terms with Examples

Declaring golang maps using the var keyword, Initializing map using map literal, Initializing golang map using the make() function, Adding Key value pair in a …

How init() function works in GoLang with Execution Flow

Each Go package can optionally have a private function named init() that is automatically executed at the beginning of execution time init() runs when the