{"id":31767760,"url":"https://github.com/yusing/goexercise","last_synced_at":"2025-10-10T01:20:43.620Z","repository":{"id":317356165,"uuid":"1067037598","full_name":"yusing/goexercise","owner":"yusing","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-30T10:25:11.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T12:22:29.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T09:49:36.000Z","updated_at":"2025-09-30T10:25:14.000Z","dependencies_parsed_at":"2025-09-30T12:23:31.912Z","dependency_job_id":"29d80ef4-9f1a-4532-82b4-68453c14cfae","html_url":"https://github.com/yusing/goexercise","commit_stats":null,"previous_names":["yusing/goexercise"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yusing/goexercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgoexercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgoexercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgoexercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgoexercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusing","download_url":"https://codeload.github.com/yusing/goexercise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgoexercise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002400,"owners_count":26083373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T01:20:40.372Z","updated_at":"2025-10-10T01:20:43.614Z","avatar_url":"https://github.com/yusing.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nalwaysApply: true\n---\n\n# Go Exercises for Frontend Developers\n\nThis is a progressive set of Go exercises designed for developers with frontend experience (JavaScript/TypeScript). The exercises focus on Go-specific concepts and idioms that differ from frontend development.\n\n## Structure\n\nEach topic has at least two files:\n\n- `N_topic.go` - Contains function/type skeletons to implement\n- `tests/N_topic_test.go` - Contains tests that verify your implementation\n- `N_topic_subtopic.go` - Contains subtopic function/type skeletons to implement\n- `tests/N_topic_subtopic_test.go` - Contains subtopic tests that verify your implementation\n\n## Running Tests\n\n```bash\nmake check\n```\n\nThis will run all tests. Initially, they will fail - your job is to implement the functions to make them pass!\n\n## Topics\n\n### 1. Basics (`1_basics.go`)\n\n**New concepts for frontend devs:**\n\n- Explicit error handling (no try/catch)\n- Multiple return values\n- \"Comma ok\" idiom for optional values\n- Goroutines and channels (async without Promises)\n- Reference vs value semantics\n\n**Key differences from JS/TS:**\n\n- No `undefined` or `null` - use zero values and comma-ok idiom\n- No exceptions - errors are values\n- Goroutines ≠ Promises (different concurrency model)\n\n### 2. Structs \u0026 Methods (`2_structs_methods.go`)\n\n**New concepts for frontend devs:**\n\n- Struct methods (not class methods!)\n- Pointer vs value receivers\n- No inheritance - composition instead\n- Generics with constraints\n- Working with `any` type (like `unknown` in TS)\n\n**Key differences from JS/TS:**\n\n- No classes - structs + methods\n- Explicit pointer semantics\n- No `this` keyword - receiver is explicit\n\n### 3. Interfaces\n\n- Duck typing (implicit implementation)\n- Empty interface and type assertions\n- Interface composition\n- Common patterns: io.Reader, io.Writer\n\n### 4. Concurrency Patterns (Coming Soon)\n\n- Worker pools\n- Fan-in/fan-out\n- Context and cancellation\n- Select statement\n- WaitGroup patterns (including `.Go()` in Go 1.25+)\n\n### 5. Iterators (Coming Soon)\n\n- `iter.Seq` and `iter.Seq2`\n- Pull vs push iteration\n- Custom iterators\n- Range over functions (Go 1.23+)\n\n### 6. HTTP \u0026 JSON (Coming Soon)\n\n- HTTP handlers and middleware\n- JSON encoding/decoding\n- Context for request handling\n- Common web patterns\n\n## Tips\n\n1. **Read the tests first** - they show exactly what's expected\n2. **Error handling** - Go doesn't use exceptions. Return errors explicitly\n3. **No magic** - Go is explicit. No implicit type coercion, no automatic async\n4. **The zero value** - Every type has a zero value (0, \"\", nil, false, etc.)\n5. **Pointers matter** - Unlike JS objects, Go structs are copied by value\n\n## Go Version\n\nThis project uses **Go 1.25.1** with modern features:\n\n- Generics (1.18+)\n- Iterators - `iter.Seq` (1.23+)\n- `sync.WaitGroup.Go()` method (1.25+)\n- Range over integers (1.22+)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fgoexercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusing%2Fgoexercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fgoexercise/lists"}