Welcome to my blog !

Multiple ways to sum the elements of an array/slice in Golang example

April 2, 2022 ·  3 min read

This post covers some of the elements of an array/slice using the below approaches in the go language. sum array elements using for range form using variadic Functions Sum of elements entered by user input In golang, a group of elements is stored in an array or slice type. To understand the below programs, You have the understanding of the following features in Go Language. Golang functions guide Golang For Loop control structure Golang For Loop Range form Golang read input from user Array/Slice Tutorials Example program Sum of array elements using for loop range In this example, We will use for loop to iterate elements in an array or slice...

Multiple ways to get Hostname and IP address in golang programs code

April 2, 2022 ·  3 min read

Golang net package The hostname is a label assigned to a machine that is connected to a network of machines. Golang standard package net provides functions related to TCP/IP, UDP, and DNS related networking related functionalities The following are various examples related to the hostname and Ip addresses in Go Language. How to Get Hostname of the System environment? It is always good to know the hostname of the environment where they go program is running....

Learn how to create a Set data structure with examples

April 2, 2022 ·  3 min read

This post covers Implementation of Set Data structure in go language with examples How to create a Set in Golang? Set is a general data structure that contains a collection of elements, does not allow duplicate elements. some programming languages like java has inbuilt Set support In a Programming language, Set is a computer data structure implementation of mathematical finest concepts. Generally Set are an Unordered list and no duplicates. In Golang, We can use Map type to implement the Set type....

Learn Golang tutorials-Install and setup Windows

April 2, 2022 ·  2 min read

Learn an easy way to install go language on windows. Go Language installation Go is a modern popular open-source programming language. Go language developed by Google. It provides binary versions for Windows, macOS, and Linux officially. If you want to install a different environment, You can get the source code and build it to your platform. Go language provides the following binaries for installation in different environments. Windows Apple macOS Linux Ubuntu Installation and Setup on Windows First, get the binary installer for windows ie MSI file from and download it....

Learn Golang Tutorials - Rune Types Explained with examples

April 2, 2022 ·  6 min read

Contents What is Rune in Golang? How to declare variable rune type in Golang? How to create Rune type using Rune Literal values? How to check variable is rune or not? How to Iterate over a string using rune type? How to Check Unicode code point and a number of a character or string? How to Convert String to/from rune array or slices? How to get the length of a string in runes and bytes Conclusion What is Rune in Golang?...

You'll get a notification every time a post gets published here.