package svc import ( "dcg/game/room" "git.noahlan.cn/northlan/ngs/component" "strings" ) type ServiceContext struct { Services *component.Components RoomManager *room.Manager } func NewServiceContext() *ServiceContext { services := &component.Components{} roomManager := room.NewRoomManager() services.Register(roomManager, component.WithName("room"), component.WithNameFunc(func(s string) string { return strings.ToLower(s) })) return &ServiceContext{ Services: services, RoomManager: roomManager, } }