1
0
Fork 0
mirror of https://github.com/shouptech/tempgopher.git synced 2026-02-03 16:49:42 +00:00
tempgopher/web.go

21 lines
256 B
Go

package main
import (
"sync"
)
// RunWeb launches a web server
func RunWeb(sc <-chan State, done <-chan bool, wg *sync.WaitGroup) {
states := make(map[string]State)
go func() {
for {
s := <-sc
states[s.ID] = s
}
}()
<-done
wg.Done()
}