mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-04-23 09:47:49 -05:00
33 lines
580 B
Go
33 lines
580 B
Go
package main
|
|
|
|
import (
|
|
"sync"
|
|
"wwfc/api"
|
|
"wwfc/common"
|
|
"wwfc/gpcm"
|
|
"wwfc/gpsp"
|
|
"wwfc/logging"
|
|
"wwfc/nas"
|
|
"wwfc/natneg"
|
|
"wwfc/qr2"
|
|
"wwfc/sake"
|
|
"wwfc/serverbrowser"
|
|
)
|
|
|
|
func main() {
|
|
config := common.GetConfig()
|
|
logging.SetLevel(*config.LogLevel)
|
|
|
|
wg := &sync.WaitGroup{}
|
|
actions := []func(){nas.StartServer, gpcm.StartServer, qr2.StartServer, gpsp.StartServer, serverbrowser.StartServer, sake.StartServer, natneg.StartServer, api.StartServer}
|
|
wg.Add(5)
|
|
for _, action := range actions {
|
|
go func(ac func()) {
|
|
defer wg.Done()
|
|
ac()
|
|
}(action)
|
|
}
|
|
|
|
wg.Wait()
|
|
}
|