Articles by Antony Shikubu
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 channel with multiple receivers
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 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 FIFO Tutorial With Examples
Read and Write into a FIFO File. EOF handling. Examples to create a reader and writer using FIFO.
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 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 …
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 …
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
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()
GO environment variables [Best Practices]
Go environment variables include os.Setnev(), os.Getenv(), os.LookupEnv(), os.Unsetenv(), godotenv (.env) file.
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
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 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 …
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, …
Golang Concurrency Explained with Best Practices
The best practices of using golang concurrency with examples and best practicies. gorutine leak, atomic, mutex, waitgroup
