Learn free golang tutorials


Golang Tutorials - Comments in Go Language

May 25, 2020 ·  4 min read

When you are learning new language, The basic thing to learn is about data types ,Control flow statements and Comments, In this blog post, You will learn about Different types of comments and how to write comments in Go Language?. In a programming language, Comments are useful statements to describe about line of code statements. Comments are part of the program that contains statements used to place human-readable information....


Golang Tutorials - Complex Types Numbers Guide With Examples

December 24, 2018 ·  3 min read

In this blog post, You will learn about Complex Numbers types in Go language with examples. Golang Complex Type Numbers Golang provides Inbuilt datatypes for numerics, strings, and other types. Numeric are int, uint, float, and complex numbers. Complex Numbers contains two parts - real numbers and imaginary numbers, for example, a complex number is 12.8i. In Golang, Complex numbers are represented in two types complex64 type- this type is used to represent float32 real and imaginary data....


Golang Example programs

December 12, 2018 ·  1 min read

Go is a Static typed popular programming language. To learn a new programming language, We must write a practical example by making use of features. This is an index page for all golang features like control statements -loops, if else, datatypes, data structures, classes, Conversions of one datatype to others,and objects All the programs and examples are compiled and tested and given output. if you are new to go language, want to learn golang before working on this program, then have a look Golang Tutorials....


Golang Recursion - Recursive function with examples

December 11, 2018 ·  3 min read

In this blog post, we are going to learn Recursive functions in golang with examples. golang recursive function Recursion is general programming code process in which method or function calls itself continuously. Go Language support recursion using functions. In Golang, function call itself is called recursive function. Using this technique, It allows code simple but complex to understand the code.  Important key points of recursion function. Function called inside the same function It is always good to specify an exit condition in the recursive function It reduces unnecessary function calls and code lines  Disadvantages with recursion is code is logical and difficult to debug and inspect the code Syntax // function declaration func recursefunction(){ //Code statements recursefunction();//function call itself } func main(){ recursefunction() // Initialize first normal call } In the above syntax, the recursive function is being called inside the same function....


Golang Example - strconv ParseFloat function guide

December 10, 2018 ·  3 min read

This blog post covers package strconv ParseFloat Function with examples in the Go Language. golang strconv ParseFloat function strconv is a standard inbuilt package in go language that provides various function implementations for converting a string to types into an int, float, boolean etc.. String to float is a common task of a programmer during development ParseFloat is an inbuilt function, converts a String value to a floating number...


Learn Go Language with fundamental tutorials with examples

December 1, 2018 ·  1 min read

This is the main page for all Go Language Tutorials with examples Go Language Tutorials Go is a popular programming language from Google company. It has the following features The syntax is similar to C language Concurrency Support Opensource Static typed Supports all platforms in Windows, Linux, Unix  Opensource Garbage collection Following are different posts on Golang  Install and Setup Golang Hello World Application Explained Variable Declaration Beginner Guide Datatype tutorials Basics if else statement with examples While Loop With examples For Loop Tutorials with examples Foreach tutorials with examples Switch Case Tutorials with examples Beginner Guide to Functions with examples Rune Type with tutorials examples Operator Guide with examples File Or Directory IO Operations with examples Golang Conversions Convert String to Boolean and back to String Convert String to Int with an example Convert Int to String with examples Convert Binary to Decimal vice versa Convert Octal to Decimal vice-versa Golang Data structures Set version of MAP with Example Map Types Guides With examples Map Advanced Programs with examples Slices Examples with tutorials Guide to Arrays with examples hostname and IP Address Related examples Golang Complete Examples Example programs ...


Learn Golang Tutorials - Rune Types Explained with examples

November 30, 2018 ·  5 min read

Golang Rune type introduction Rune is a data type in the Go programming language. Rune is character literal which represents int32 value and each int value is mapped to Unicode code point https://en.wikipedia.org/wiki/Code_point It represents any characters of any alphabet from any language in the world. Each Character in language has a different meaning. For the English language, the character is from alphabets has ‘B’,‘b’,'&', for Chinese, it is ‘我’...


Learn Golang Tutorias Set Data structure with examples

November 29, 2018 ·  3 min read

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


Learn Golang tutorials - Map Guide with examples

November 27, 2018 ·  11 min read

In this tutorial, We are going to learn map built-in type with examples in the Go Language. Golang Map Introduction A map is a popular collection data structure, contains key and value pairs. It is used to represent hashtable and dictionaries in other programming languages. Java has HashTable, Python has Dictionary types. It provides fast loops, search, update, deletions based on the keys. Important points of Maps in Go Programming language....


Learn Golang Tutorials - Beginner guide Slice Examples

November 25, 2018 ·  12 min read

This blog post covers Golang Slice Complete tutorials with example Golang Slice Introduction Arrays are static fixed size. Slices are dynamically sized, This means arrays once created can not change its size. Slice can change size and It gives more power and flexibility compared with Arrays I already posted an article on Arrays in Golang. Key points of Slice  Slice is a dynamic array that can increase its size Slices are similar to Arrays in other programming language-go Slice does not contain own data and uses an array internally Internally Slices uses Array point a reference to it, have more power and flexible Slices elements are indexable Slice Variable Create and Initialize There are many ways we can create a Slice variable and initialize it...


Learn Golang Tutorials - Arrays Beginner Guide with examples

November 23, 2018 ·  10 min read

This blog covers Beginner guide to Arrays in Golangauage with examples. Golang Arrays Introduction An array is one of the data structure which contains a collection of elements with referred as the same name and grouped under same data type. It is the fixed size in length. The following are topic covered in this post Array syntax Array Declaration  Declare with Array Literals Initialization with array ellipse Access elements of an array Size of array Iterate elements using for loop and range keyword Multidimensional arrays creation with literals, Shorthand syntax Array struct or object example - Create, Access, iterate Find Array variable type Arrays types are not assignable with different length Arrays are value types Linear search example Popular array runtime errors Following are some of the keynotes of arrays in go language...


GoLang Examples - Convert String to Int types with examples

November 21, 2018 ·  5 min read

This article three ways to Convert String to Integer in Go Language. Golang cast String int usually when we want to perform mathematical calculations on strings which contains text. For example, This will be received an input from a user on a form in web applications, If the user enters any value in the text field. For example, the string contains numbers “134” and will convert this string to int....


Golang Example - strconv ParseInt Function explained

November 20, 2018 ·  3 min read

In this blog post, We are going to learn strconv ParseInt Function with examples in the Go Language. strconv ParseInt Function strconv package provides functions for converting String to or from different data types. PaseInt() is one of the functions used to convert String to Integer types and used for Number conversions. You can get official documentation from here Syntax Here is a signature of ParseInt example func ParseInt(s string, radix/base int, bitSize int) (i int64, err error) Arguments List -...


Golang Examples - Convert string to boolean or boolean to string datatype

November 19, 2018 ·  3 min read

In this blog post, You will learn how String conversion from Boolean type in go language with examples. Golang String bool conversion string and bool are predefined data types available in Golang. String accepts a group of characters, bool accepts true or false values. for example, string type contains value - “true"|"false”, bool type contains values - true|false. In Go language, String conversion will not happen automatically. We have to write a custom manual lcode or use standard packages - fmt or strconv to do that....


Learn Golang Tutorials - Operators Guide with examples

November 19, 2018 ·  11 min read

Go Language Operators Like many programming languages, Golang has a support for various inbuilt operators. Important keynotes of operators in the Go language Operators are character sequence used to execute some operations on a given operand(s) Each operator in Go language is of types Unary Operator or Binary Operator. Binary operators accept two operands, Unary Operator accepts one operand Operators operate on one or two operands with expressions These are used to form expressions The following are different types covered as part of this blog post...


Learn Golang Tutorials - File Directory IO operations Guide with examples

November 16, 2018 ·  12 min read

Golang File Operations In Any programming language, File IO operations are basic functionality. These operations are low-level calls made to underline operating System to operate physical files. Go Language also provides many operations as part of standard packages. All these operations accept input, process it and output to or from physical files. There are many standard inbuilt packages that we are going to use in this post **bufio package ** It contains functions IOUtil package has functions for Input and Output operations os package provides platform independent functionalities for Operating System....


Learn Golang Tutorials - Beginner guide to Functions with examples

November 14, 2018 ·  9 min read

Golang Functions This article covers the following things related to functions in Go language why Function are required? Function Declarations Multiple return values Named return values Defer closure Anonymous functions The function assigned as the value passing arguments to the function function slice to an array why Function is required? Functions are a program or multiple lines code written to achieve specific functionality. every functionality is defined as a function in Go Langauge....


Learn Golang tutorials - Switch case statement guide with examples

November 14, 2018 ·  10 min read

This article covers the Switch case statements with expressions and types with various syntax examples. __ Golang Switch case statements Switch case is used to execute a particular code block when we have multiple code blocks based on condition. It is an alternative syntax for writing if-else block. Unlike other programming languages like Java and C+, where, the break is needed to stop its execution. Go language is automatically stopped its execution when matching case executed....


Learn Golang Tutorials - foreach loop with range keyword examples

November 13, 2018 ·  3 min read

In this blog post, We are going to learn for each loop with range in go language with example Golang for each loop  the foreach loop is a for loop with range keyword. It is used iterate each element from Array, Slice, Map, and Strings. This is always useful to iterate the elements of a data structure without getting the length of data structure Syntax of the for with range loop is as follows...


Learn Golang tutorials - For Loop beginner guide with examples

November 12, 2018 ·  4 min read

This blog post covers the For Loop with a break, continue, goto keywords with examples in Go Language. Golang For loop For loop is used to execute the code block at a specific number of times. it is one more control structure type in go language. Following is a syntax of for loop for initialization; conditional Boolean expression; increment|decrement { // Code block } following are notes of for loop syntax...


Learn Golang tutorials - While loop beginner guide with examples

November 12, 2018 ·  2 min read

This blog post covers learn while and do while loop guide with examples in Golang. Golang while loop  Like other programming languages, There is no while loop or do while loop in go language. Instead, it provides for loop with a boolean expression. This will executes code of block multiple times until conditional expression is true. if conditional expressions result false, It exits the control from the loop block....


Learn Golang Tutorials - if else statement examples

November 12, 2018 ·  4 min read

In this blog post, we are going to learn control flow structures - if-else statements in Go Language with examples. golang if statements Like many programming languages, Go Language provides control structures for decision making. if and else statements are one of type.if statements are used to execute a piece of code based on the conditional expressions, if the condition is satisfied, code block will be executed. This blog post covers examples and syntaxes for the following things...


Learn Golang Tutorials - Data types Basic Guide with examples

November 12, 2018 ·  4 min read

In this blog post series, We are going to learn basic inbuilt predefined data types in golang tutorials with examples. Go language data types Go is a modern opensource programming language from Google. It is a static type language which means type checking will be done at compile time. Variable can be declared a type or inferred from type inference. datatypes in golang define the same type of data that can be used to allocates memory size for storing the particular value....


Learn Golang tutorials - Variables starter guide with examples

November 12, 2018 ·  4 min read

In this blog post, It covers the Golang Tutorials variables guide with examples Golang Tutorials variables Variables usage in go language is the same as another programming language like java. Variables are the name assigned for a space in memory that saves the values. Variables of different types. Based on each type, memory size will be accommodated Variables name can be named using letters, digits and underscore characters. Go lang is case sensitive so that upper and lower names are different....


Learn Golang tutorials - Install and setup Go language on Windows

November 12, 2018 ·  2 min read

In this blog post, We are going to learn an easy way to install go language on windows. Go Language installation  Go is a modern popular opensource programming language. Go language is 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 built it to your platform. Go language provides the following binaries for installation on different environments...


Learn Golang Tutorials - Hello World First Program example Explained

November 7, 2018 ·  4 min read

In this blog post, We are going to learn the basics of Go Language tutorial with Hello World Example. Go Language Tutorials Go is a popular Opensource programming language released by Google. When you are learning any language, You will write a sample Hello world example. You need the following things to write and execute the Go Program Go Compiler installation use any code editor like Sublimetext or Atom, Visual studio code, and write code manually like below Hello World First Sample Program Example Like java programming language, To run the code, you need to do following things First you need to compile the code to generate machine-readable code which runs the code...