https://github.com/zhravan/golearn
Small exercises to get you used to reading and writing Go code
https://github.com/zhravan/golearn
awesome-go awesome-golang go golang golearn gopher hacktoberfest hacktoberfest-accepted hacktoberfest2025 learn-go rustlings
Last synced: 8 days ago
JSON representation
Small exercises to get you used to reading and writing Go code
- Host: GitHub
- URL: https://github.com/zhravan/golearn
- Owner: zhravan
- License: mit
- Created: 2025-08-18T02:12:42.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-12-18T01:55:15.000Z (6 months ago)
- Last Synced: 2026-04-27T14:34:12.342Z (about 2 months ago)
- Topics: awesome-go, awesome-golang, go, golang, golearn, gopher, hacktoberfest, hacktoberfest-accepted, hacktoberfest2025, learn-go, rustlings
- Language: Go
- Homepage: https://zhravan.github.io/golearn/
- Size: 270 KB
- Stars: 16
- Watchers: 0
- Forks: 19
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Notice: NOTICE
Awesome Lists containing this project
README
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.
### At a glance
- Simple CLI to list and verify exercises
- Helpful hints and solution links when you're stuck
- Watch mode to auto-run tests on changes
- Progress dashboard with a visual bar and checklists
- Publish your progress to GitHub and appear on the README leaderboard
### Install (Go 1.22+)
```bash
go install github.com/zhravan/golearn/cmd/golearn@latest
```
### Use
```bash
# In any folder, set up exercises here
golearn init
# Or clone a remote exercises repo
# golearn init
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
# Publish your progress (appears on README leaderboard)
golearn publish --dry-run
golearn publish --user
```
### Contributing
- See [CONTRIBUTING.md](./CONTRIBUTING.md)
- Please follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
- Security issues: see [SECURITY.md](./SECURITY.md)
Need commands?
```bash
golearn help
```
## Makefile shortcuts
```bash
# 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](./LICENSE)
- Non-code lesson content and any included gopher artwork: [CC BY 3.0](./CONTENT_LICENSE).
- Inspired by rustlings and Go by Example. [NOTICE](./NOTICE) for attributions.
## Leaderboard
The following users have completed all exercises (ascending by completion time):
No completions yet. Be the first!