mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 17:47:11 +00:00
Change roomID format
This commit is contained in:
parent
d9561a81a0
commit
221188b44b
1 changed files with 3 additions and 2 deletions
5
main.go
5
main.go
|
|
@ -9,6 +9,7 @@ import (
|
|||
"math/rand"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
|
@ -319,8 +320,8 @@ func ws(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// generateRoomID generate a unique room ID containing 16 digits
|
||||
func generateRoomID() string {
|
||||
//roomID := strconv.FormatInt(rand.Int63(), 16)
|
||||
roomID := uuid.Must(uuid.NewV4()).String()
|
||||
roomID := strconv.FormatInt(rand.Int63(), 16)
|
||||
//roomID := uuid.Must(uuid.NewV4()).String()
|
||||
return roomID
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue