Code Room
Code reviewMedium
Question
Review this Go HTTP handler serving a rarely-changing config blob.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
func configHandler(w http.ResponseWriter, r *http.Request) { cfg, err := loadConfigFromDB() // ~50ms, changes a few times a day if err != nil { http.Error(w, "error", 500) return } b, _ := json.Marshal(cfg) w.Header().Set("Content-Type", "application/json") w.Write(b)}Run or narrate your approach, then ask the coach.