Code Room
Code reviewHard
Question
Review this Go config holder. `Snapshot` returns a copy of the config for read-only use by handlers.
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
type Config struct { mu sync.Mutex Values map[string]string} func (c *Config) Set(k, v string) { c.mu.Lock() c.Values[k] = v c.mu.Unlock()} func (c *Config) Snapshot() Config { c.mu.Lock() defer c.mu.Unlock() return *c // copy under lock}Run or narrate your approach, then ask the coach.