Used the idg.Generator from github
This commit is contained in:
+3
-2
@@ -12,6 +12,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/smcquay/idg"
|
||||
"golang.org/x/net/websocket"
|
||||
)
|
||||
|
||||
@@ -28,7 +29,7 @@ func (h JsonHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
// Controller is the shepherd of a collection of games. The main package in
|
||||
// server simply populates one of these and starts an http server.
|
||||
type Controller struct {
|
||||
Idg *IdGenerator
|
||||
Idg *idg.Generator
|
||||
Conf Config
|
||||
Games MapLock
|
||||
Memprofile string
|
||||
@@ -40,7 +41,7 @@ type Controller struct {
|
||||
// Controller.
|
||||
func NewController(conf Config, mprof, pprof string) *http.ServeMux {
|
||||
c := &Controller{
|
||||
Idg: NewIdGenerator(),
|
||||
Idg: idg.NewGenerator(),
|
||||
Conf: conf,
|
||||
Games: MapLock{
|
||||
M: make(map[string]*Game),
|
||||
|
||||
Reference in New Issue
Block a user