Golang Tutorial
Welcome to Go Language (GoLang) Tutorial. In this tutorial, we learn what Go language is, its features, and list out the tutorials covering basics, conditional and looping statements, collections, etc.
“Go” and “Golang” are used interchangeably in this and subsequent tutorials.
What is Go Language?
Go is a programming language initially developed at Google in the year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
Go language provides a rich standard library. The Go programming language is used in some of Google’s production systems and also in many other major companies.
Resemblance with other languages
Go is a statically-typed language having the syntax similar to that of C.
Golang Features
Go language provides
- Garbage Collection
- Type Safety
- Dynamic-typing capability
and many advanced built-in types such as variable length arrays and key-value maps.
Prerequisites to learn Go
Basic programming concepts would help you understand easily. This Go tutorial is targeted for beginners. So, even if you have just started programming with Go language, we will guide you through the basics of Go programming with well detailed tutorials.
Go Tutorials
Basics
Others
Conditional Statements
Looping Statements
Others
Example Programs using Looping Statements
Operators
Logical Operators
Arithmetic Operators
- Golang – Addition Operator
- Golang – Subtraction Operator
- Golang – Multiplication Operator
- Golang – Division Operator
- Golang – Remainder Operator
- Golang – Increment Operator
- Golang – Decrement Operator
Functions
Functions are basic in any functional or modular programming language.
String Operations
- Golang – String Length
- Golang – String Concatenation
- Golang – Check if Strings are Equal
- Golang – Compare Strings
- Golang – Check if String contains Substring
- Golang – Check if String starts with a Prefix
- Golang – Check if String ends with a Suffix
- Golang – Count occurrences of Substring in a String
- Golang – Find Index of Last Occurrence of Substring in String
- Golang – Get index of a substring in a String
- Golang – Join/Concatenate String and Integer
- Golang – Replace Substring in String
- Golang – Split String
- Golang – String to Uppercase
- Golang – String to Lowercase
- Golang – Trim spaces around String
Conversions
- Golang – Convert String to Integer
- Golang – Convert String to Float
- Golang – Convert Int to String
- Golang – Convert String into Array of Characters
Arrays
Arrays are a kind of sequential data structures that allow to store multiple elements of a datatype under a single variable. You can access the elements using index.
- Golang – Declare and Initialize Arrays
- Golang – Array Length
- Golang – Create String Array
- Golang – Create Integer Array
- Golang – Iterate over Array using For Loop
- Golang – Check if Specific Element is present in Array
Slice
- Golang Slice
- Golang – Slice Length
- Golang – Iterate over Slice using For Loop
- Golang – Check if Specific Element is present in Slice
- Golang – Sort Slice of Strings
- Golang – Sort Slice of Integers
Structures
Range
Maps
- Golang Map
- Golang – Create Empty Map
- Golang – Map Length
- Golang – Iterate over Map
- Golang – Update Key in Map
- Golang – Nested Maps
- Golang – Check if Key is present in Map
Conversions
Channels
Classes
HTTP
Recursion
Error Handling
- Golang Error Handling