A comprehensive project for Go MCQ exam preparation focusing on:
- Standard Library ONLY (No third-party dependencies)
- Edge Cases and Traps
- Zero Values and Initialization
- Memory Behavior and Pointers
- Variable Declarations and Scope
- Zero Values
- Type Conversions
- Strings, Bytes, and Runes
- If/Else Statements
- Switch Statements (with
fallthrough) - Loops (
forandrange)
- Arrays vs. Slices
- Maps
- Structs and Composition
- Functions and Multiple Returns
- Pointers and Memory Addresses
- Methods (Value vs. Pointer Receivers)
- The
errorInterface - The
deferStatement panicandrecover
- Interfaces and Implicit Implementation
- Type Assertions
- Goroutines and Channels
fmt,strings,strconvio,os,encoding/jsontime,math,math/rand
To run the examples in any stage, you must navigate into that stage's directory and run the entire package together using go run ..
Do NOT run individual files (like go run 1_variables.go) because the functions are shared across the package.
Example Usage:
# 1. Open your terminal and navigate to the project directory (LearnGo)
# 2. Enter a specific stage
cd stage1_types_and_variables
# 3. Run all files in that stage together
go run .After running the code, open the files in your editor and read the detailed English comments to understand the "Why" behind the code.
- EXAM_NOTES.md - Golden tips, edge cases, and traps. Review this right before the exam.
- SAMPLE_MCQ.md - Practice questions with explanations. Test your knowledge.