package application import ( "fmt" "sirlab.de/go/knyt/game" ) func (app Application) GetGameById(id string) (*game.Game, error) { app.mu.Lock() defer app.mu.Unlock() gm := app.games[id] if gm == nil { return nil, fmt.Errorf("unknown id") } return gm, nil }