Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 2.03 KB

File metadata and controls

77 lines (57 loc) · 2.03 KB

logo

GoLearn

Rustlings‑style Go exercises in a tiny CLI.

Why this exists

This project is my attempt to learn Go by building as I learn, making the journey more engaging while exploring the language in practice. I'm sharing the exercises and tooling so others can learn alongside me.

Install (Go 1.22+)

go install github.com/zhravan/golearn/cmd/golearn@latest

Use

# In any folder, set up exercises here
golearn init

# Or clone a remote exercises repo
# golearn init <repo-url> <dir>
golearn init https://github.com/your-org/your-exercises my-exercises
cd my-exercises

# Learn
golearn list
golearn verify 01_hello
golearn hint 01_hello
golearn solution 01_hello   # Suggests hints; else prints GitHub link
golearn verify 01_hello --solution  # Run tests against the embedded solution
golearn progress    # Rich TUI with ASCII progress bar and checklist

# Auto-verify on change (watch mode)
golearn watch       # Watches ./exercises and re-runs tests per edited exercise

Contributing

Need commands?

golearn help

Makefile shortcuts

# Show help
make

# Run commands
make list
make verify NAME=01_hello
make progress
make watch

Tips

  • The progress bar adapts to terminal width via the COLUMNS env var.
  • Press Ctrl+C to stop watch mode.

Licensing and Attribution

  • Code: MIT
  • Non-code lesson content and any included gopher artwork: CC BY 3.0.
  • Inspired by rustlings and Go by Example. NOTICE for attributions.