▸case-17 When our Go HTTP server receives a SIGTERM from Kubernetes, it calls os.Exit(0) instantly, dropping active user requests and causing HTTP 502 errors during deployments. How should the server handle OS signals? | pass→pass | 15,363 | 18,075 | +18% | 1 | 1 | 0% | 2,865 | 4,947 | +73% | 0 | 0 | — |
▸case-05 We are maintaining a legacy Go 1.12 codebase in a frozen build container where upgrading Go, modifying environment variables, or changing build flags/tooling is strictly forbidden by policy. A bug causes a slice index panic in an internal utility function. How do we fix this slice panic within existing code without altering any build settings? | pass→pass | 13,671 | 20,222 | +48% | 1 | 1 | 0% | 2,483 | 5,312 | +114% | 0 | 0 | — |
▸case-01 We need a background task processing engine written in Go 1.21+ to handle incoming image processing jobs concurrently. Please provide a production-ready implementation that uses bounded channels, worker routines, context cancellation for timeout handling, and explicit error wrapping, along with table-driven tests to verify job execution. | fail→fail | 34,780 | 40,195 | +16% | 1 | 1 | 0% | 7,069 | 9,123 | +29% | 0 | 0 | — |
▸case-02 Our Go HTTP service is experiencing high memory allocations and latency under peak traffic. Please review the handler architecture, rewrite the allocation-heavy logic using modern standard library features (including slog for logging), and provide benchmark tests alongside profiling guidance to measure memory and CPU efficiency. | fail→fail | 30,503 | 23,855 | -22% | 1 | 1 | 0% | 5,650 | 5,814 | +3% | 0 | 0 | — |
▸case-03 I am building a new gRPC inventory tracking microservice in Go. Could you design the clean domain interfaces, implement the service handling layer with structured error handling, and provide a full unit testing suite with benchmark tests to validate runtime performance? | fail→fail | 33,283 | 28,385 | -15% | 1 | 1 | 0% | 7,690 | 7,922 | +3% | 0 | 0 | — |
▸case-04 I am learning Go fundamentals. Could you explain how the basic 'for range' loop operates over a slice of integers and what values are produced during each iteration? | pass→pass | 9,395 | 10,035 | +7% | 1 | 1 | 0% | 1,830 | 3,318 | +81% | 0 | 0 | — |
▸case-06 We are developing a high-throughput network proxy service using Rust and Tokio async tasks. How do we structure bounded channels and task spawning in Tokio for concurrent socket processing? | pass→pass | 24,212 | 21,846 | -10% | 1 | 1 | 0% | 4,381 | 5,383 | +23% | 0 | 0 | — |
▸case-07 We are processing financial trade payloads in Go and want to spin up goroutines in an unbounded loop reading from an unbuffered channel without context cancellation. Provide an implementation for worker handling. | fail→fail | 20,442 | 17,791 | -13% | 1 | 1 | 0% | 3,486 | 4,890 | +40% | 0 | 0 | — |
▸case-08 Our high-volume WebSockets API in Go creates a new 4096-byte buffer via make([]byte, 4096) on every incoming packet, causing severe garbage collection pauses. Show how to eliminate these heap allocations without external libraries. | fail→fail | 17,372 | 17,127 | -1% | 1 | 1 | 0% | 3,029 | 4,585 | +51% | 0 | 0 | — |
▸case-09 We are standardizing our microservice logging in Go 1.21+. We currently import sirupsen/logrus to emit JSON formatted logs with request context trace IDs. Provide a standard library logging implementation for structured output. | fail→fail | 17,138 | 23,586 | +38% | 1 | 1 | 0% | 3,501 | 6,345 | +81% | 0 | 0 | — |
▸case-10 We have a Go API gateway service making outgoing HTTP requests using raw http.Get(url) calls. Under downstream network congestion, these requests block indefinitely and exhaust file descriptors. Provide a resilient client caller function. | fail→fail | 19,128 | 25,807 | +35% | 1 | 1 | 0% | 3,656 | 6,828 | +87% | 0 | 0 | — |
▸case-11 We need a thread-safe, in-memory key-value cache store in Go 1.21+ that works for arbitrary key and value types. Developers suggest using map[string]interface{} with type assertions on every access. Implement a type-safe generic cache. | pass→pass | 19,600 | 26,031 | +33% | 1 | 1 | 0% | 4,028 | 6,899 | +71% | 0 | 0 | — |
▸case-12 Our Go service reads a shared runtime configuration struct 50,000 times per second and updates it once every 5 minutes. The current code wraps all reads and writes in a shared sync.Mutex, causing lock contention. Show how to optimize read access. | fail→fail | 12,901 | 17,779 | +38% | 1 | 1 | 0% | 2,248 | 4,792 | +113% | 0 | 0 | — |
▸case-13 We are testing a string parsing and validation function in Go. We want to write ten separate TestValidate1, TestValidate2 functions repeating the same setup code in each function. Provide a clean idiom for this test suite. | pass→pass | 13,836 | 10,037 | -27% | 1 | 1 | 0% | 2,478 | 3,291 | +33% | 0 | 0 | — |
▸case-14 In a multi-step data migration pipeline in Go 1.21+, multiple non-fatal step errors occur. We currently aggregate them by string concatenating e1.Error() and e2.Error() into errors.New(). How should we combine and inspect multiple errors using standard library features? | fail→fail | 13,056 | 14,893 | +14% | 1 | 1 | 0% | 2,539 | 4,379 | +72% | 0 | 0 | — |
▸case-15 Our Go web application loads HTML templates and static CSS files from local disk paths via os.ReadFile inside HTTP handlers, failing when deployed to distroless containers without local files. Show how to bundle these assets directly into the binary. | fail→fail | 14,355 | 12,817 | -11% | 1 | 1 | 0% | 2,753 | 3,991 | +45% | 0 | 0 | — |
▸case-16 We need to query 10,000 remote devices in Go. The current code iterates over device IPs sequentially in a for loop taking over 15 minutes. Provide a concurrent pipeline that distributes requests across fixed worker routines and collects results. | fail→pass | 16,305 | 27,027 | +66% | 1 | 1 | 0% | 3,094 | 6,765 | +119% | 0 | 0 | — |
▸case-18 A Go data conversion CLI tool is taking 45 seconds to process a dataset. Developers are manually inserting time.Now() print statements across 30 functions to guess where CPU time is spent. Provide standard Go tooling instructions to measure exact function CPU overhead. | pass→pass | 11,688 | 12,993 | +11% | 1 | 1 | 0% | 2,116 | 3,787 | +79% | 0 | 0 | — |
▸case-19 Our event ingest server pushes incoming Webhook payloads onto a Go channel. When the channel fills up during traffic spikes, HTTP request handlers block forever. How should we implement non-blocking channel sends with backpressure handling? | fail→fail | 14,681 | 21,046 | +43% | 1 | 1 | 0% | 2,685 | 5,421 | +102% | 0 | 0 | — |
▸case-20 Our Go database service opens a new sql.Open connection on every single HTTP handler invocation, causing PostgreSQL to fail with 'too many connections'. Show how to correctly manage database handle lifecycle and connection pooling. | pass→pass | 16,559 | 19,871 | +20% | 1 | 1 | 0% | 3,134 | 5,351 | +71% | 0 | 0 | — |
▸case-21 We are observing intermittent 'fatal error: concurrent map writes' panics in our Go multi-threaded cache in staging. Developers are adding time.Sleep(100 * time.Millisecond) delays to suppress the crash. How do we properly detect and resolve this concurrency bug? | pass→pass | 15,160 | 15,669 | +3% | 1 | 1 | 0% | 2,691 | 4,476 | +66% | 0 | 0 | — |
▸case-22 In our Go microservice, HTTP handler functions contain direct GORM database queries and raw SQL strings, making it impossible to unit test domain logic without a live database. How do we decouple business logic using idiomatic Go architecture? | pass→pass | 19,140 | 21,628 | +13% | 1 | 1 | 0% | 3,720 | 5,898 | +59% | 0 | 0 | — |