1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-07-15 23:54:29 +02:00

Add API client, integration tests structure and server lifecycle changes

This commit is contained in:
Miguel de la Cruz
2020-11-09 13:19:03 +01:00
parent 3c68a97451
commit 1111bd337a
8 changed files with 520 additions and 26 deletions

19
server/utils/utils.go Normal file
View File

@ -0,0 +1,19 @@
package utils
import (
"crypto/rand"
"fmt"
"log"
)
// CreateGUID returns a random GUID.
func CreateGUID() string {
b := make([]byte, 16)
_, err := rand.Read(b)
if err != nil {
log.Fatal(err)
}
uuid := fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
return uuid
}