▸case-01 We need to build a high-throughput stream processor in Go for our data pipeline that handles thousands of incoming webhooks per second. Please design and implement the service architecture, including worker pools for concurrent job processing, context cancellation for graceful shutdowns, and a unit/benchmark testing suite. Provide the full code layout and performance optimization steps. | fail→pass | 38,129 | 39,010 | +2% | 1 | 1 | 0% | 8,255 | 7,537 | -9% | 0 | 0 | — |
▸case-02 I'm refactoring an older Go microservice to modern Go standards (1.21+). Can you review our architectural layout and propose a clean, production-ready structure? Include a complete implementation pattern for persistent storage integration, structured logging, custom domain error handling, and a strategy for profiling memory usage under load. | fail→fail | 41,097 | 27,558 | -33% | 1 | 1 | 0% | 7,763 | 5,263 | -32% | 0 | 0 | — |
▸case-03 We are building a command-line utility in Go to parse and aggregate gigabytes of log files fast without ballooning memory usage. Please write a production-grade implementation using modern Go concurrent primitives, efficient file scanning techniques, and a complete guide for profiling CPU/memory bottlenecks alongside integration tests. | fail→fail | 46,616 | 39,028 | -16% | 1 | 1 | 0% | 8,247 | 8,691 | +5% | 0 | 0 | — |
▸case-04 I am learning Go for the first time. Can you explain basic syntax for declaring variables, using `if` statements, and writing simple `for` loops with basic beginner examples? | pass→pass | 16,771 | 16,750 | -0% | 1 | 1 | 0% | 2,297 | 2,788 | +21% | 0 | 0 | — |
▸case-05 Our company deploys Go binaries to legacy hardware using a fixed, unchangeable Go 1.10 toolchain where we cannot modify build flags, update Go tooling, or change compiler configurations. Can you help us configure a Go 1.21+ build pipeline for this setup? | fail→pass | 22,997 | 11,929 | -48% | 1 | 1 | 0% | 3,112 | 1,642 | -47% | 0 | 0 | — |
▸case-06 We are building a concurrent microservice in Rust using the Tokio async runtime and hyper HTTP web framework. Can you write the service implementation and async task pool in Rust? | fail→pass | 28,524 | 8,461 | -70% | 1 | 1 | 0% | 4,835 | 1,034 | -79% | 0 | 0 | — |
▸case-07 We need a helper function to deduplicate and sort a slice of structs by ID in our Go service. A teammate suggested writing custom nested loops with a manual map lookup. How should this be implemented in Go 1.21+ using standard library capabilities? | pass→pass | 13,582 | 23,702 | +75% | 1 | 1 | 0% | 2,630 | 4,050 | +54% | 0 | 0 | — |
▸case-08 Our HTTP service cancels database contexts on timeouts, but downstream telemetry cannot determine whether the cancellation was caused by a database query deadline or an explicit cancellation signal. Developers currently call `context.WithTimeout`. How can we attach explicit cancellation error causes in Go 1.21+? | pass→pass | 17,150 | 14,841 | -13% | 1 | 1 | 0% | 2,421 | 3,409 | +41% | 0 | 0 | — |
▸case-09 We want to replace `log.Printf` and third-party loggers with standard library structured JSON logging in Go 1.21+. A junior developer proposed writing custom `fmt.Sprintf` JSON formatter functions. How should structured logging be implemented? | fail→fail | 20,525 | 19,429 | -5% | 1 | 1 | 0% | 2,777 | 3,311 | +19% | 0 | 0 | — |
▸case-10 Our network protocol handler allocates thousands of temporary `[]byte` buffers per second, causing frequent GC pauses. A team member suggested setting `GOGC=500`. What is the idiomatic Go memory reuse pattern for temporary buffers? | fail→pass | 21,712 | 23,010 | +6% | 1 | 1 | 0% | 2,856 | 3,775 | +32% | 0 | 0 | — |
▸case-11 We need to execute three HTTP requests in parallel. If any request fails, all other pending requests must cancel immediately, and the first error should return. Current code uses `sync.WaitGroup` with manual error channel collection. What pattern should be used? | fail→fail | 13,975 | 14,177 | +1% | 1 | 1 | 0% | 1,848 | 2,257 | +22% | 0 | 0 | — |
▸case-12 In an asynchronous processing loop `for _, task := range tasks { go func() { process(task) }() }`, older Go versions required passing `task` as a parameter to avoid closure bugs. What is the loop variable behavior in modern Go (1.22+)? | fail→fail | 11,547 | 11,716 | +1% | 1 | 1 | 0% | 1,242 | 1,681 | +35% | 0 | 0 | — |
▸case-13 We store an application configuration struct read by millions of concurrent HTTP request handlers. The config updates once a day. Developers currently guard reads with a `sync.RWMutex`. What is the zero-lock concurrency pattern in Go for atomic pointer replacement? | fail→fail | 16,373 | 18,374 | +12% | 1 | 1 | 0% | 2,104 | 2,905 | +38% | 0 | 0 | — |
▸case-14 Our REST API service experiences sudden memory spikes under heavy load. We need a systematic procedure and code setup to profile memory allocations and identify heap memory leaks. How should this be implemented? | pass→pass | 25,763 | 19,318 | -25% | 1 | 1 | 0% | 3,911 | 4,076 | +4% | 0 | 0 | — |
▸case-15 We have multiple custom numeric types and need a generic utility function that returns the minimum and maximum of two values without writing separate functions per type or using interface reflection. How should this be written in Go 1.21+? | fail→fail | 9,545 | 11,054 | +16% | 1 | 1 | 0% | 1,813 | 2,577 | +42% | 0 | 0 | — |
▸case-16 We are designing a user management microservice in Go. The team is debating writing SQL queries directly inside HTTP handler functions. How should layer separation be structured for production maintainability? | fail→fail | 22,745 | 21,024 | -8% | 1 | 1 | 0% | 3,292 | 4,721 | +43% | 0 | 0 | — |
▸case-17 During Kubernetes deployments, our Go HTTP services abruptly close active client connections when SIGTERM is received. How do we implement clean graceful shutdown? | fail→fail | 22,515 | 27,774 | +23% | 1 | 1 | 0% | 3,295 | 4,896 | +49% | 0 | 0 | — |
▸case-18 Processing thousands of background jobs by spawning an unbounded number of goroutines `go process(job)` causes out-of-memory crashes during traffic spikes. How should concurrency be limited in Go? | fail→fail | 16,393 | 14,501 | -12% | 1 | 1 | 0% | 3,018 | 3,133 | +4% | 0 | 0 | — |
▸case-19 Our service logs errors formatted with `fmt.Errorf("failed: %v", err)`, which loses original error types and prevents callers from inspecting root causes. How should error wrapping and inspection be implemented? | pass→pass | 11,993 | 16,726 | +39% | 1 | 1 | 0% | 2,187 | 2,732 | +25% | 0 | 0 | — |
▸case-20 Our PostgreSQL connection pool in Go frequently exhausts connections during sudden traffic surges, returning connection refused errors. How should the connection pool parameters in `database/sql` be configured? | fail→fail | 16,927 | 14,573 | -14% | 1 | 1 | 0% | 3,002 | 2,971 | -1% | 0 | 0 | — |
▸case-21 Our Go service makes outbound REST calls using `http.DefaultClient`. During downstream network outages, HTTP calls hang indefinitely, consuming server worker threads. How should HTTP clients be safely constructed? | fail→fail | 14,465 | 22,693 | +57% | 1 | 1 | 0% | 2,756 | 3,982 | +44% | 0 | 0 | — |
▸case-22 Our unit test suite contains dozens of copy-pasted test functions for input string sanitization logic. How should this test suite be refactored using standard Go testing patterns? | pass→pass | 19,473 | 22,358 | +15% | 1 | 1 | 0% | 2,813 | 3,763 | +34% | 0 | 0 | — |