fix typos in README

This commit is contained in:
medunes
2026-01-05 22:07:09 +01:00
parent e0d6df9e6f
commit 54c54e8d3d

View File

@@ -1,88 +1,96 @@
# 🥋 Go Katas 🥋 # 🥋 Go Katas 🥋
> "I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times." > "I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times."
(Bruce Lee) >
> (Bruce Lee)
## What should it be? ## What should it be?
- Go is simple to learn, but nuanced to master. The difference between "working code" and "idiomatic code" often lies in details such as safety, memory efficiency, and concurrency control. - Go is simple to learn, but nuanced to master. The difference between "working code" and "idiomatic code" often lies in details such as safety, memory efficiency, and concurrency control.
- This repository is a collection of **Daily Katas**: small, standalone coding challenges designed to drill specific Go patterns into your muscle memory. - This repository is a collection of **Daily Katas**: small, standalone coding challenges designed to drill specific Go patterns into your muscle memory.
## What should it NOT be? ## What should it NOT be?
- This is not intended to teach coding, having Go as the programming mean. Not even intended to teach you Go **in general** - This is not intended to teach coding, nor to use Go as a general-purpose learning vehicle. It is not intended to teach Go **in general**.
- The focus should be as much as possible challenging oneself to solve common software engineering problems **the Go way**.
- Several seasoned developers spent years learning and applying best-practices at prod-grade context. Once they decide to switch to go, they would face two challanges: - The focus should be, as much as possible, on challenging oneself to solve common software engineering problems **the Go way**.
- Is there a window of knowledge transform here, so that I don't have to through years of my career from the window at start from zero?
- If yes, the which parts should I focus on to recognize the mismatches and use them the expected way in the Go land? - Several seasoned developers spend years learning and applying best practices in production-grade contexts. When they decide to switch to Go, they often face two challenges:
- Is there a way to transfer knowledge so that I dont have to throw away years of experience and start from zero?
- If yes, which parts should I focus on to recognize mismatches and use them the expected way in the Go ecosystem?
## How to Use This Repo ## How to Use This Repo
1. **Pick a Kata:** Navigate to any `XX-kata-yy` folder.
2. **Read the Challenge:** Open the `README.md` inside that folder. It defines the Goal, the Constraints, and the "Idiomatic Patterns" you must use. 1. **Pick a Kata:** Navigate to any `XX-kata-yy` folder.
3. **Solve It:** Initialize a module inside the folder and write your solution. 2. **Read the Challenge:** Open the `README.md` inside that folder. It defines the goal, the constraints, and the "idiomatic patterns" you must use.
4. **Reflect:** Compare your solution with the provided "Reference Implementation" (if available) or the core patterns listed. 3. **Solve It:** Initialize a module inside the folder and write your solution.
4. **Reflect:** Compare your solution with the provided "Reference Implementation" (if available) or the core patterns listed.
## Contribution Guidelines ## Contribution Guidelines
### Have a favorite Go pattern? Please refer to the [CONTRIBUTING](CONTRIBUTING.md) file
1. Create a new folder `XX-your-topic`. (`XX` is an ordinal number)
2. Copy the [README_TEMPLATE.md](./README_TEMPLATE.md) to the new folder as `README.md`
3. Define the challenge: focus on **real-world scenarios** (e.g., handling timeouts, zero-allocation sets), and **idiomatic Go**, not just algorithmic puzzles.
4. **Optionally**, create a `main.go` or any other relevant files under the project containing blueprint of the implementation, **as long as you think it reduces confusion and keeps the implementation focused**
5. Submit a PR.
## Katas Index (Grouped) ## Katas Index (Grouped)
### 01) Context, Cancellation, and Fail-Fast Concurrency ### 01) Context, Cancellation, and Fail-Fast Concurrency
Real-world concurrency patterns that prevent leaks, enforce backpressure, and fail fast under cancellation. Real-world concurrency patterns that prevent leaks, enforce backpressure, and fail fast under cancellation.
- [01 - The Fail-Fast Data Aggregator](./01-context-cancellation-concurrency/01-concurrent-aggregator/) - [01 - The Fail-Fast Data Aggregator](./01-context-cancellation-concurrency/01-concurrent-aggregator)
- [03 - Graceful Shutdown Server](./01-context-cancellation-concurrency/03-graceful-shutdown-server/) - [03 - Graceful Shutdown Server](./01-context-cancellation-concurrency/03-graceful-shutdown-server)
- [05 - Context-Aware Error Propagator](./01-context-cancellation-concurrency/05-context-aware-error-propagator/) - [05 - Context-Aware Error Propagator](./01-context-cancellation-concurrency/05-context-aware-error-propagator)
- [07 - The Rate-Limited Fan-Out Client](./01-context-cancellation-concurrency/07-rate-limited-fanout/) - [07 - The Rate-Limited Fan-Out Client](./01-context-cancellation-concurrency/07-rate-limited-fanout)
- [09 - The Cache Stampede Shield (singleflight TTL)](./01-context-cancellation-concurrency/09-single-flight-ttl-cache/) - [09 - The Cache Stampede Shield (singleflight TTL)](./01-context-cancellation-concurrency/09-single-flight-ttl-cache)
- [10 - Worker Pool with Backpressure and errors.Join](./01-context-cancellation-concurrency/10-worker-pool-errors-join/) - [10 - Worker Pool with Backpressure and errors.Join](./01-context-cancellation-concurrency/10-worker-pool-errors-join)
- [14 - The Leak-Free Scheduler](./01-context-cancellation-concurrency/14-leak-free-scheduler/) - [14 - The Leak-Free Scheduler](./01-context-cancellation-concurrency/14-leak-free-scheduler)
- [17 - Context-Aware Channel Sender (No Leaked Producers)](./01-context-cancellation-concurrency/17-context-aware-channel-sender/) - [17 - Context-Aware Channel Sender (No Leaked Producers)](./01-context-cancellation-concurrency/17-context-aware-channel-sender)
--- ---
### 02) Performance, Allocation, and Throughput ### 02) Performance, Allocation, and Throughput
Drills focused on memory efficiency, allocation control, and high-throughput data paths. Drills focused on memory efficiency, allocation control, and high-throughput data paths.
- [02 - Concurrent Map with Sharded Locks](./02-performance-allocation/02-concurrent-map-with-sharded-locks/) - [02 - Concurrent Map with Sharded Locks](./02-performance-allocation/02-concurrent-map-with-sharded-locks)
- [04 - Zero-Allocation JSON Parser](./02-performance-allocation/04-zero-allocation-json-parser/) - [04 - Zero-Allocation JSON Parser](./02-performance-allocation/04-zero-allocation-json-parser)
- [11 - NDJSON Stream Reader (Long Lines)](./02-performance-allocation/11-ndjson-stream-reader/) - [11 - NDJSON Stream Reader (Long Lines)](./02-performance-allocation/11-ndjson-stream-reader)
- [12 - sync.Pool Buffer Middleware](./02-performance-allocation/12-sync-pool-buffer-middleware/) - [12 - sync.Pool Buffer Middleware](./02-performance-allocation/12-sync-pool-buffer-middleware)
--- ---
### 03) HTTP and Middleware Engineering ### 03) HTTP and Middleware Engineering
Idiomatic HTTP client/server patterns, middleware composition, and production hygiene. Idiomatic HTTP client/server patterns, middleware composition, and production hygiene.
- [06 - Interface-Based Middleware Chain](./03-http-middleware/06-interface-based-middleware-chain/) - [06 - Interface-Based Middleware Chain](./03-http-middleware/06-interface-based-middleware-chain)
- [16 - HTTP Client Hygiene Wrapper](./03-http-middleware/16-http-client-hygiene/) - [16 - HTTP Client Hygiene Wrapper](./03-http-middleware/16-http-client-hygiene)
--- ---
### 04) Errors: Semantics, Wrapping, and Edge Cases ### 04) Errors: Semantics, Wrapping, and Edge Cases
Modern Go error handling: retries, cleanup, wrapping, and infamous pitfalls. Modern Go error handling: retries, cleanup, wrapping, and infamous pitfalls.
- [08 - Retry Policy That Respects Context](./04-errors-semantics/08-retry-backoff-policy/) - [08 - Retry Policy That Respects Context](./04-errors-semantics/08-retry-backoff-policy)
- [19 - The Cleanup Chain (defer + LIFO + Error Preservation)](./04-errors-semantics/19-defer-cleanup-chain/) - [19 - The Cleanup Chain (defer + LIFO + Error Preservation)](./04-errors-semantics/19-defer-cleanup-chain)
- [20 - The “nil != nil” Interface Trap (Typed nil Errors)](./04-errors-semantics/20-nil-interface-gotcha/) - [20 - The “nil != nil” Interface Trap (Typed nil Errors)](./04-errors-semantics/20-nil-interface-gotcha)
--- ---
### 05) Filesystems, Packaging, and Deployment Ergonomics ### 05) Filesystems, Packaging, and Deployment Ergonomics
Portable binaries, testable filesystem code, and dev/prod parity. Portable binaries, testable filesystem code, and dev/prod parity.
- [13 - Filesystem-Agnostic Config Loader (io/fs)](./05-filesystems-packaging/13-iofs-config-loader/) - [13 - Filesystem-Agnostic Config Loader (io/fs)](./05-filesystems-packaging/13-iofs-config-loader)
- [18 - embed.FS Dev/Prod Switch](./05-filesystems-packaging/18-embedfs-dev-prod-switch/) - [18 - embed.FS Dev/Prod Switch](./05-filesystems-packaging/18-embedfs-dev-prod-switch)
--- ---
### 06) Testing and Quality Gates ### 06) Testing and Quality Gates
Idiomatic Go testing: table-driven tests, parallelism, and fuzzing. Idiomatic Go testing: table-driven tests, parallelism, and fuzzing.
- [15 - Go Test Harness (Subtests, Parallel, Fuzz)](./06-testing-quality/15-testing-parallel-fuzz-harness/) - [15 - Go Test Harness (Subtests, Parallel, Fuzz)](./06-testing-quality/15-testing-parallel-fuzz-harness)