Home »
Golang
Golang Tutorial
This Go language programming tutorial provides detailed information step-by-step, starting from the basics to the advanced topics. Each chapter is explained with the help of appropriate examples.
What is Go Programming Language?
Go language is an open-source programming language that makes it easy to build simple, reliable, and efficient software.
Origin and Designers
Go was designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson.
Key Features
Go is a statically typed, compiled programming language that offers:
- Statically typed: You must define variable types before using them.
- Compiled: The code is converted into machine language before running.
- Memory safety: It helps prevent common memory errors.
- Garbage collection: It automatically frees up unused memory.
- Structural typing: Types are checked based on their structure, not just names.
CSP-style concurrency: It uses lightweight threads (goroutines) to run tasks at the same time.
Go First Example
The most common function for printing to the console is fmt.Println()
. Below is a simple example that prints "Hello World" to the screen.
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
When executed, this program outputs:
Hello World
Go Code Editor
You can run Go language code on Go Playground.
Go Language Learning Path
1. Basics
2. Variable Handling
3. Literals
4. Type Handling
5. Operators
6. Decision Making
7. Loops
8. Functions
9. String Handling
10. Go Arrays
Miscellaneous Topics
- How to print boolean value in Golang?
- How to print double-quoted string in Golang?
- Golang - Convert from int to binary
- Golang - Convert from int to octal
- Golang - Convert from int to hex
- How to check if structure is empty in Golang?
- How to check if key exists in a map in Golang?
- How to return an error in Golang?
- Golang - new() and make() functions with examples
Go Practice and Exam Preparation
Advertisement
Advertisement