# Encontre o bug: Go > Um trecho de código. Encontre o bug, ou prove que não existe nenhum. Desafio diário: 2026-08-19 (UTC) · Mid-Level ```go package users import "sync" type User struct { ID string Name string } var ( mu sync.Mutex cache = map[string]*User{} ) func GetUser(id string, fetch func() *User) *User { mu.Lock() defer mu.Unlock() if u, ok := cache[id]; ok { return u } u := fetch() cache[id] = u return u } ``` ## Seu veredito - Falha de segurança - Bug de lógica - Estilo de código - Sem problema Uma tentativa por dia. A resposta aparece logo depois. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/desafio-diario/go