Skip to content

[FEAT] Add missing Go 1.21+ standard library lessons (slices, maps, cmp, context.AfterFunc)#513

Draft
rasel9t6 wants to merge 1 commit into
mainfrom
feat/add-missing-stdlib-lessons
Draft

[FEAT] Add missing Go 1.21+ standard library lessons (slices, maps, cmp, context.AfterFunc)#513
rasel9t6 wants to merge 1 commit into
mainfrom
feat/add-missing-stdlib-lessons

Conversation

@rasel9t6
Copy link
Copy Markdown
Collaborator

Closes #512

Scope

  • Section: s02, s04, s07
  • New lessons: DS.7 (slices), DS.8 (maps), CT.6 (context.AfterFunc)
  • Updated: TI.9 (generics — added cmp.Compare/cmp.Less), README.md (item count 215 → 219)

Type

  • [FEAT]

Summary

Adds 4 missing Go 1.21+ standard library topics identified in the extended audit:

Lesson Package Key API coverage
DS.7 slices slices Sort, Compact, BinarySearch, Contains, Index, Delete, Insert, Clone, Equal
DS.8 maps maps Clone, Copy, Keys, Values, DeleteFunc, Equal
CT.6 AfterFunc context AfterFunc scheduling, stop(), immediate-fire
TI.9 integration cmp Compare, Less with cmp.Ordered constraint

Validation

  • go build ./... — pass
  • go vet ./... — pass
  • gofmt — all clean
  • go test ./... — all pass (59 suites)
  • go run ./scripts/validate_curriculum.go — 613 files, 12 sections, 219 items — success

…ontext.AfterFunc, cmp

Adds 4 missing standard library topics identified in the extended audit:

- DS.7 (slices): Covers slices.Sort, Compact, BinarySearch, Contains, Index, Delete, Insert, Clone, Equal. Teaches the modern Go way to work with slices.
- DS.8 (maps): Covers maps.Clone, Copy, Keys, Values, DeleteFunc, Equal. Teaches generic map operations.
- CT.6 (context.AfterFunc): Covers scheduling callbacks on context cancellation, immediate-fire for cancelled contexts, and stop() for cancellation.
- TI.9 (generics integration): Added cmp.Compare and cmp.Less examples to the existing generics lesson. Updated WHAT-YOU-LL-LEARN to mention cmp.Ordered.

Curriculum: 215 -> 219 items. README.md count updated. All cross-references (NEXT UP, README Next Step) updated. All READMEs follow 11-section contract with Mermaid diagrams and [!NOTE]/[!TIP] alerts.

Closes #512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add missing Go 1.21+ standard library lessons (slices, maps, cmp, context.AfterFunc)

1 participant