Notes — Module 0: Introduction¶
These are your personal study notes. Write freely and honestly. Incomplete notes are fine — they show where your understanding still needs work. Return to this file to add insights as they develop over time.
Module: [[modules/go-0-introduction]] Topic: [[go]] Date started: ___________ Status: Not started
Concept Map¶
Sketch how the concepts in this module relate to each other. Fill in the Mermaid diagram.
mindmap
root((Go Introduction))
Toolchain
go run
go build
go fmt
go vet
go mod init
Hello World
package main
import fmt
func main
fmt.Println
Module System
go.mod
module path
go.sum
vs GOPATH
Philosophy
Simplicity
Explicit errors
Composition
Fast compilation
Alternative: draw this on paper, photo it, and link the image here.
Study Tips for This Module¶
Before diving in, a few things that help with the Go introduction specifically:
- Type every code example by hand. The muscle memory of
package main,import "fmt",func main()matters. Don't copy-paste. - Run
go fmtimmediately. After writing code, rungo fmt ./...and look at what it changes. This builds the habit early. - Try intentional errors. Delete the
import "fmt"line and see what the compiler says. Add an unused variable. Put the{on a new line. The compiler errors are clear and educational. - Initialize a real module. Don't just run individual files — create a directory, run
go mod init, and work inside that module from the start.
Key Insights¶
The "aha moments" — the things that, once understood, made the rest clear. Be specific: "I finally understood X because Y" is more useful than "X makes sense".
- Add insights as you discover them
- Add insights as you discover them
- Add insights as you discover them
My Understanding¶
Explain the core concepts in your own words, as if teaching them to someone else. If you can't explain it simply, you don't understand it well enough yet.
package main and func main()¶
Your explanation here:
What I'm still unsure about: ___________
The go.mod module system¶
Your explanation here:
What I'm still unsure about: ___________
go run vs go build¶
Your explanation here:
What I'm still unsure about: ___________
Why unused imports are compile errors¶
Your explanation here:
Connections to Other Topics¶
How does this module connect to things you already know?
| This module's concept | Connects to | How |
|---|---|---|
package main |
Python if __name__ == "__main__": |
Both define the program entry point |
go mod init |
npm's package.json, pip's requirements.txt |
Both are dependency declaration files |
go fmt |
Python's black, JS's prettier |
Opinionated auto-formatters that remove style debates |
| Compiled binary | [[docker-containers]] | Go binaries are easy to containerize — just copy the binary |
Questions That Arose¶
Log questions as they appear. Don't stop to answer them now — just capture them. Then move the serious ones to QUESTIONS.md.
- Add questions here as they occur
Code Snippets Worth Remembering¶
Patterns, idioms, or examples that captured something important.
The minimal Go program¶
Why I'm saving this: The irreducible minimum — everything Go needs to be a runnable program.
Initializing a new module¶
Why I'm saving this: This is always the first thing you do in a new Go project.
Checking the error pattern¶
Why I'm saving this: This pattern appears in nearly every Go program. Worth internalizing from day one.
What Tripped Me Up¶
Mistakes I made, misconceptions I had, things that confused me more than they should have. Being honest here helps you later.
- Add stumbling blocks here as they occur
Summary in My Own Words¶
Write a 3–5 sentence summary of this entire module without looking at any notes. If you can't do this, you need more study time.
Write your summary here after completing the module:
_Last updated: ____________