Apply goformat on source code
This commit is contained in:
parent
c4d6acdb9f
commit
67dd1d6bfb
2
loop.go
2
loop.go
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,4 +42,3 @@ type Message struct {
|
|||
Args string
|
||||
Source string
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -2,10 +2,12 @@ package transport
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/gorilla/websocket"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in New Issue