Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@
<h6 align="center">Rustlings‑style Go exercises in a tiny CLI.</h6>
</p>

<div align="center">
<img src="https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-for%20learning%20and%20knowledge%20sharing-blueviolet"/>
</div>

### 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
Expand Down Expand Up @@ -35,9 +47,14 @@ 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 <github-username>
```

### Contributing

- See [CONTRIBUTING.md](./CONTRIBUTING.md)
- Please follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
- Security issues: see [SECURITY.md](./SECURITY.md)
Expand Down Expand Up @@ -72,6 +89,10 @@ make watch
- 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.

<div align="center">
<img src="https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-for%20learning%20and%20knowledge%20sharing-blueviolet"/>
</div>
## Leaderboard

The following users have completed all exercises (ascending by completion time):

<!-- START_LEADERBOARD -->
No completions yet. Be the first!
<!-- END_LEADERBOARD -->
10 changes: 10 additions & 0 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Usage:
golearn solution [name] Show solution flow (hint-first; or link)
golearn watch Watch files and re-run tests on change
golearn progress Show progress
golearn publish [options] Publish your progress to upstream as a PR
golearn reset [name] Reset exercise to starter state
golearn init [repo] [dir] Initialize workspace: clone exercises repo or copy built-in templates
golearn help Show this help
Expand All @@ -27,6 +28,12 @@ Global options:
--no-color Disable ANSI colors (honors NO_COLOR)
--theme=<name> Theme: default | high-contrast | monochrome
--screen-reader, --sr Optimize for screen readers; avoid screen clears

Publish options (env overrides in parentheses):
--repo=<url> Upstream repo to contribute to (GOLEARN_PUBLISH_REPO)
--user=<name> Your GitHub username (GOLEARN_PUBLISH_USER)
--branch=<name> Branch to create for the PR
--dry-run Print JSON snapshot instead of creating a PR
`
}

Expand Down Expand Up @@ -72,6 +79,9 @@ func Execute(args []string) error {
return runWatch()
case "progress":
return runProgress()
case "publish":
// pass through remaining args to the publish handler
return runPublish(args[1:])
case "reset":
var name string
if len(args) > 1 {
Expand Down
Loading