Apply goformat on source code

This commit is contained in:
wpetit 2018-09-18 18:01:28 +02:00
parent c4d6acdb9f
commit 67dd1d6bfb
6 changed files with 11 additions and 12 deletions

View File

@ -137,7 +137,6 @@ func inLoop(c *Channel, m *methods) error {
go m.processIncomingMessage(c, msg)
}
}
return nil
}
var overflooded map[*Channel]struct{} = make(map[*Channel]struct{})
@ -178,7 +177,6 @@ func outLoop(c *Channel, m *methods) error {
return closeChannel(c, m, err)
}
}
return nil
}
/**

View File

@ -42,4 +42,3 @@ type Message struct {
Args string
Source string
}

View File

@ -238,7 +238,7 @@ func (s *Server) BroadcastToAll(method string, args interface{}) {
Generate new id for socket.io connection
*/
func generateNewId(custom string) string {
hash := fmt.Sprintf("%s %s %n %n", custom, time.Now(), rand.Uint32(), rand.Uint32())
hash := fmt.Sprintf("%s %s %d %d", custom, time.Now(), rand.Uint32(), rand.Uint32())
buf := bytes.NewBuffer(nil)
sum := md5.Sum([]byte(hash))
encoder := base64.NewEncoder(base64.URLEncoding, buf)

View File

@ -2,10 +2,12 @@ package transport
import (
"errors"
"github.com/gorilla/websocket"
"io/ioutil"
"log"
"net/http"
"time"
"github.com/gorilla/websocket"
)
const (