๐๏ธ Introduction
Welcome to the Golang handbook.
๐๏ธ Program Structure
Every Go program, no matter how big or small, follows a few key rules:
๐๏ธ Statements
A statement is a complete instruction that tells the computer to do something.
๐๏ธ Variables
There are two ways to declare a variable:
๐๏ธ Data Types
Inferred
๐๏ธ Output
Two Families of Printing in Go
๐๏ธ Functions
Basic Syntax:
๐๏ธ Methods
A method is like a function, but itโs attached to a specific type (usually a struct).
๐๏ธ Control Flow
if Statement
๐๏ธ Package
- A package is a collection of related Go files (.go) grouped together.
๐๏ธ Scoping
Scope is the region of the program where a variable, constant, function, or type is accessible.
๐๏ธ Internal Memory
When we talk about "internal memory" in Go (or any language), weโre referring to how data is stored and managed in the computerโs RAM while the program runs.
๐๏ธ Memory Allocation
1. Memory placement
๐๏ธ Error Handling
In Go, error handling is explicit โ meaning you have to manually check and handle errors instead of relying on exceptions (like in Java, Python, or C#).