Go Track
Weekly Goals
- Go Fundamentals
- Set up Go environment and understand workspace/modules.
- Master pointers, structs, and methods.
- Understand interfaces and composition (vs inheritance).
- DSA
- Start with arrays, strings, maps (easy → medium) using Go.
- Concurrency Intro
- Goroutines and Channels basics.
Use together with:
Weekly Overview Table
| Day | Focus |
|---|---|
| 1 | Environment + Go Syntax Refresher |
| 2 | Pointers, Structs, Methods |
| 3 | Interfaces & Composition |
| 4 | Type System (Arrays, Slices, Maps) |
| 5 | Generics & Functional Options |
| 6 | Concurrency Basics (Goroutines) |
| 7 | Channels + Weekly Review |
Day 1 – Environment Setup & Go Syntax Refresher
4-Hour Plan
-
Block 1 (Core – 60 min)
- Install Go (latest stable) and set up VS Code (Go extension).
- Initialize a project:
go mod init github.com/username/learning-go. - Learn:
package main,import,func main(). - Skim role-understanding.md.
-
Block 2 (Go Basics – 60 min)
- Review:
- Variables:
varvs:=. - Basic types:
int,float64,string,bool. - Control flow:
if,for(nowhilein Go),switch.
- Variables:
- Implement small snippets:
- FizzBuzz, simple calculator.
- Review:
-
Block 3 (DSA – 60 min)
- From DSA Backend Plan, Arrays & Strings:
- Solve 2–3 easy problems in Go.
- Focus on Go's strict typing and lack of concise functional helpers (like
map/filterin JS) - write loops explicitly.
- From DSA Backend Plan, Arrays & Strings:
-
Block 4 (Review – 30–45 min)
- Write a short note:
- Go workspace structure.
- Differences from JS (static typing, compilation).
- Update skill gap template.
- Write a short note:
6-Hour Plan
- Do everything in the 4-hour plan, plus:
- Extra DSA block (45–60 min):
- +1–2 medium array/string problems.
- Extra Go practice (45–60 min):
- Explore
fmtpackage deeply (Printfverbs like%v,%+v,%T).
- Explore
- Extra DSA block (45–60 min):
Day 2 – Pointers, Structs, and Methods
4-Hour Plan
-
Block 1 (Concepts – 60–75 min)
- Study:
- Pointers:
&(address of),*(dereference), nil pointers. - Structs: Defining data structures.
- Methods: Value receivers
(s Student)vs Pointer receivers(s *Student).
- Pointers:
- Draw a diagram showing stack vs heap (basic concept).
- Study:
-
Block 2 (Hands-On – 60 min)
- Implement:
- A
Userstruct with methods (e.g.,UpdateEmail). - Experiment with mutating a struct using value vs pointer receiver to see the difference.
- A
- Implement:
-
Block 3 (DSA – 60 min)
- 2–3 easy/medium problems.
- Focus on:
- Passing arrays (fixed size) vs slices (reference-like) to functions.
-
Block 4 (Review – 30 min)
- Write down:
- When to use pointer receivers (mutation, large structs).
- Write down:
6-Hour Plan
- Add:
- Extra coding (60 min):
- Implement a simple linked list node struct and a method to traverse it.
- Extra DSA (45 min).
- Extra coding (60 min):
Day 3 – Interfaces & Composition
4-Hour Plan
-
Block 1 (Concepts – 60–75 min)
- Learn:
- Interfaces: Implicit implementation (duck typing).
- Embedding: Composition over inheritance (struct embedding).
- The empty interface
interface{}(orany).
- Learn:
-
Block 2 (Hands-On – 60 min)
- Implement:
- Define an interface
ShapewithArea(). Implement it forCircleandRectangle. - Create a function that takes
Shapeand prints area. - Use struct embedding to compose a
Managerstruct fromEmployee.
- Define an interface
- Implement:
-
Block 3 (DSA – 60 min)
- 2–3 problems.
- Use maps (
map[string]int) for frequency counting.
-
Block 4 (Review – 30 min)
- Note: How Go's interfaces differ from Java/TS interfaces.
6-Hour Plan
- Add:
- Mini-refactor (45–60 min):
- Refactor Day 2's User struct to satisfy a
Stringerinterface (String() string).
- Refactor Day 2's User struct to satisfy a
- Extra DSA (45 min).
- Mini-refactor (45–60 min):
Day 4 – Type System (Arrays, Slices, Maps)
4-Hour Plan
-
Block 1 (Concepts – 60–75 min)
- Study:
- Arrays (value type) vs Slices (backing array window).
- Slice internals: length vs capacity.
- Maps: creation, deletion, "comma ok" idiom.
- Study:
-
Block 2 (Hands-On – 60 min)
- Implement:
- Slice manipulation:
append, slicingarr[1:3],copy. - Map operations: check existence, iterate.
- Slice manipulation:
- Implement:
-
Block 3 (DSA – 60 min)
- Solve 2–3 problems focusing on Slice tricks (e.g., deleting an element, filtering).
-
Block 4 (Review – 30 min)
- Update skill-gap-template.md.
6-Hour Plan
- Add:
- Deep Dive (60 min):
- Write a script to demonstrate slice capacity growth and how multiple slices can share backing arrays (and potential gotchas).
- Extra DSA (45 min).
- Deep Dive (60 min):
Day 5 – Generics & Functional Options
4-Hour Plan
-
Block 1 (Concepts – 60–75 min)
- Learn:
- Generics (Go 1.18+): Type parameters
[T any]. - Functional Options Pattern: Configuring complex structs.
- Generics (Go 1.18+): Type parameters
- Learn:
-
Block 2 (Hands-On – 60 min)
- Implement:
- A generic
MaporFilterfunction for slices. - A
Serverstruct constructor using Functional Options (e.g.,WithPort(8080),WithTimeout(5s)).
- A generic
- Implement:
-
Block 3 (DSA – 60 min)
- 2–3 problems. Try to use your generic helpers if applicable.
-
Block 4 (Review – 30 min)
- Summarize when to use Generics (don't overuse!).
6-Hour Plan
- Add:
- Generic refactor (60 min):
- Create a generic
Stack[T]orQueue[T]data structure.
- Create a generic
- Extra DSA (45 min).
- Generic refactor (60 min):
Day 6 – Concurrency Basics: Goroutines
4-Hour Plan
-
Block 1 (Concepts – 60–75 min)
- Learn:
- Goroutines: Lightweight threads,
gokeyword. - WaitGroups:
sync.WaitGroupto wait for completion. - Race conditions (concept).
- Goroutines: Lightweight threads,
- Learn:
-
Block 2 (Hands-On – 60 min)
- Implement:
- Launch 100 goroutines that print a number.
- Use
WaitGroupto ensure main function waits for them. - Introduce a race condition (shared counter) and detect it with
go run -race.
- Implement:
-
Block 3 (DSA – 60 min)
- Mixed arrays/strings/maps.
-
Block 4 (Review – 30 min)
- Write note: Concurrency vs Parallelism.
6-Hour Plan
- Add:
- Concurrency mini-project (60 min):
- Concurrent file downloader (simulated with sleep) using WaitGroup.
- Extra DSA (45 min).
- Concurrency mini-project (60 min):
Day 7 – Channels & Weekly Review
4-Hour Plan
-
Block 1 (Concepts – 45–60 min)
- Learn:
- Channels: Unbuffered vs Buffered.
- Sending
ch <- valand receivingval := <-ch. - Closing channels and range over channels.
- Learn:
-
Block 2 (Hands-On – 60 min)
- Implement:
- A producer-consumer pipeline (numbers -> square -> print).
- Use a buffered channel to limit concurrency.
- Implement:
-
Block 3 (Review & DSA – 60 min)
- Solve 2–3 DSA problems.
- Revisit notes & update skill gap template.
-
Block 4 (Planning – 30 min)
- Summarize:
- 3 biggest Go learnings.
- Weakest subtopics.
- Skim week-02.
- Summarize:
6-Hour Plan
- Add:
- Mini integration (60–75 min):
- Build a "worker pool": 3 workers processing jobs from a jobs channel and sending results to a results channel.
- Extra 1–2 DSA problems (45 min).
- Mini integration (60–75 min):