Welcome To Golang By Example

Menu
  • Home
  • Blog
Menu

Blog

Using Context Package in GO (Golang) – Complete Guide

Posted on December 23, 2023June 5, 2023 by admin

Introduction: Definition: Context is a package provided by GO. Let’s first understand some problems that existed already, and which context package tries to solve. Problem Statement: Let’s say that you started a…

Check all groups that current logged in user belong to on Linux

Posted on December 10, 2023December 10, 2023 by admin

groups command on linux can be used to know which all groups a user belongs to Just type in groups on the terminal. Below is the output on my Mac machine

Ruby convert string to bool

Posted on August 24, 2023August 24, 2023 by admin

Overview In the Ruby language, strings “true” and “false” are interpreted as true when used in the if condition. See example below Output “false” evaluates to true Therefore it becomes important to…

Know the current user on Linux

Posted on August 9, 2023August 9, 2023 by admin

Overview Linux command ‘whoami’ can be used to know the currently logged-in user. Let’s see this command in action. Go to the terminal and type in the command It will print the…

Convert an array of int or numbers to string in Go (Golang)

Posted on March 6, 2023March 6, 2023 by admin

Overview In this tutorial, we will see how to convert an array of ints or numbers to a string in Go. Below is the program for the same. Program Here is the…

Check if a string contains single or multiple whitespaces in Go (Golang)

Posted on February 10, 2023February 10, 2023 by admin

Overview A simple regex can be used to check if a string contains single or multiple white spaces in Go. Here is the program for the same Program Output Note: Check out…

Create or initialize a new string in Go (Golang)

Posted on February 7, 2023February 7, 2023 by admin

Overview Below is a simple way to initialize or create a string in Go. In the below program, we have simply declared as well as defined a string named sample Notice the…

Delete or Remove a key from a map in Go (Golang)

Posted on January 2, 2023January 2, 2023 by admin

Overview Below is the format to delete a given key from a map There are two cases Let’s see an example of both the cases Key exists in the Map Below is…

Convert an IOTA or Enum to a string in Go (Golang)

Posted on November 10, 2023November 10, 2023 by admin

Overview Enum in Golang can be created by using IOTA. Please refer to this post to learn more about IOTA In this post, we will see how to convert an IOTA or…

Enum in Golang

Posted on November 10, 2023November 10, 2023 by admin

Overview IOTA provides an automated way to create an enum in Golang. Let’s see an example. Example Output In above program we created a new type Then we declared some const of…

Sort a slice of Int in Ascending and Descending order in Go (Golang)

Posted on October 13, 2023October 13, 2023 by admin

Sort a slice in Ascending order sort.Ints package of going can be used to sort a full slice or a part of the slice. It is going to sort the string into…

Posts pagination

1 2 … 62 Next

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Web XP