# Trouve le bug : Go > Un extrait de code. Trouve le bug, ou prouve qu'il n'y en a pas. Défi du jour: 2026-08-19 (UTC) · Confirmé ```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 } ``` ## Ton verdict - Faille de sécurité - Bug de logique - Style de code - Aucun problème Une tentative par jour. La réponse s'affiche juste après. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/fr/defi-du-jour/go