Chapter 2: Go Introduction
Go Introduction
“Go Introduction” is not one single fixed page or command (unlike “A Tour of Go”). Instead, it’s the general name people use when they want:
- The very first explanation of what Go (Golang) actually is
- Why it was created
- Who uses it in 2026
- How it feels different from Python / Java / JavaScript / C++
- A gentle first “Hello World” to feel the vibe
The official place to start your “Go Introduction” is actually two pages on go.dev:
- The homepage → https://go.dev/ (short high-level intro)
- The “Get Started” tutorial → https://go.dev/doc/tutorial/getting-started (hands-on first steps + code)
But today I’ll act like your personal offline teacher and give you the full detailed introduction right here — like we’re sitting with coffee and VS Code open.
1. What is Go? (The 30-second version)
Go (official name: Go, commonly called Golang) is:
- Open-source programming language
- Created at Google in 2007–2009
- Designed by legends: Robert Griesemer, Rob Pike, Ken Thompson (yes — the Ken Thompson who invented Unix & C)
- Released publicly: November 2009
- Current stable version (Feb 2026): Go 1.24 or 1.25 (very fast release cycle — usually 2 major versions per year)
Core philosophy (written on go.dev homepage):
“An open source programming language supported by Google. Easy to learn and great for teams. Built-in concurrency and a robust standard library. Large ecosystem of partners, communities, and tools.”
In one sentence: Go is the language you choose when you want C-like speed + safety + modern simplicity + excellent concurrency — without the pain of C++ or Rust.
2. Why was Go created? (The real story)
Around 2007–2008 at Google:
- Servers were becoming multicore + networked
- Codebases were becoming huge (millions of lines)
- Compiling C++ took forever (minutes to hours)
- Garbage collection in Java felt slow/heavy for Google-scale systems
- Python was great for scripts — but too slow for production infrastructure
- Developers were frustrated with too many tools/languages
So the three creators said: “Let’s make a language that fixes all the things we hate about existing languages — but keeps the good parts.”
They wanted:
- Fast compilation (you press build → done in <1 second even for big projects)
- Excellent concurrency support (run thousands of tasks easily)
- Simple syntax (readable by anyone in the team)
- Static typing + compile-time checks (no surprise runtime crashes)
- Single binary output (no need for JVM / Python interpreter / virtualenv hell)
Result → Go became hugely popular for:
- Cloud infrastructure (Kubernetes, Docker, Terraform, Prometheus are all written in Go)
- Web backends / APIs (fast + low memory)
- CLI tools (hugo, cobra, etc.)
- Microservices
- DevOps tools
- Networking / distributed systems
3. Key Features of Go (What makes it special in 2026)
| Feature | What it means | Why it’s great for beginners & pros |
|---|---|---|
| Simple & clean syntax | Looks like simplified C — no classes, no inheritance | You learn it in days, not months |
| Fast compilation | Build huge projects in seconds | Edit → run → debug loop is instant |
| Built-in concurrency | goroutines + channels | Write concurrent code like sequential code |
| Garbage collected | No manual memory management | Safe + productive |
| Single static binary | go build → one file you copy anywhere | Deploy = just scp the binary |
| Strong standard library | http, json, crypto, testing — all built-in | Rarely need external deps at start |
| Excellent tooling | go fmt, go vet, go test, modules, etc. | Almost no setup pain |
| Cross-platform | Compile for Linux/Windows/macOS/ARM from anywhere | One codebase → many targets |
4. First “Hello World” — Your real introduction starts here
Create a folder anywhere (no $GOPATH needed anymore!):
|
0 1 2 3 4 5 6 7 |
mkdir ~/go-intro cd ~/go-intro |
Initialize a Go module (modern way since 2018+):
|
0 1 2 3 4 5 6 |
go mod init github.com/webliance/intro |
Create file main.go:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
// Every Go program starts with a package declaration package main // Import the formatting/printing library (from standard library) import "fmt" // The entry point — like main() in C/Java func main() { // Print to console fmt.Println("Hello from Hyderabad, Telangana! 🇮🇳") fmt.Println("Welcome to Go — February 2026 style 🚀") // Quick variable demo name := "Webliance" age := 25 // type inferred — no need to write int isLearningGo := true fmt.Printf("Hello %s! You are %d and learning Go = %t\n", name, age, isLearningGo) } |
Run it (two ways):
|
0 1 2 3 4 5 6 7 |
# Way 1: run without creating binary (great for quick tests) go run main.go |
|
0 1 2 3 4 5 6 7 8 9 |
# Way 2: build a real executable go build # Now you have ./intro (or intro.exe on Windows) ./intro |
Output:
|
0 1 2 3 4 5 6 7 8 |
Hello from Hyderabad, Telangana! 🇮🇳 Welcome to Go — February 2026 style 🚀 Hello Webliance! You are 25 and learning Go = true |
That’s it — you just wrote, ran, and understood your first Go program!
5. One slightly more interesting example (to feel the power)
Let’s make a tiny concurrent “worker” demo — something Python would need threading/multiprocessing + locks:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
package main import ( "fmt" "time" ) func greet(person string, delay time.Duration) { time.Sleep(delay) // simulate work fmt.Printf("Hello %s! (after %v)\n", person, delay) } func main() { fmt.Println("Starting greetings...") // Launch lightweight threads (goroutines) with 'go' go greet("Webliance", 2*time.Second) go greet("Friend in Hyderabad", 1*time.Second) go greet("Go learner", 500*time.Millisecond) // Main keeps running — we wait a bit time.Sleep(3 * time.Second) fmt.Println("All greetings sent! 🎉") } |
Run → you see messages appear almost at the same time (order can vary):
|
0 1 2 3 4 5 6 7 8 9 10 |
Starting greetings... Hello Go learner! (after 500ms) Hello Friend in Hyderabad! (after 1s) Hello Webliance! (after 2s) All greetings sent! 🎉 |
This is Go’s killer feature — concurrency feels natural and cheap.
Your next steps (my teacher recommendation — Feb 2026)
- Install latest Go right now → https://go.dev/dl (choose 1.24.x or newer)
- Open https://go.dev/tour → finish Welcome + Basics section today (30–60 min)
- Then do the official Get Started tutorial → https://go.dev/doc/tutorial/getting-started
- Install VS Code + Go extension (auto-format, go to definition, debugging — amazing)
Confused about anything yet?
- Why no classes?
- What are slices vs arrays?
- How does error handling work (no try-catch)?
- Modules vs old GOPATH?
- Goroutines vs threads?
Just say the word — I’ll explain with more examples, like we’re pair-programming live.
Keep going — you’re doing awesome! 💪🇮🇳
