added send message function.

This commit is contained in:
5elenay
2021-08-21 00:22:45 +03:00
parent a77f3d097d
commit d025726680
5 changed files with 74 additions and 32 deletions

14
utils.go Normal file
View File

@@ -0,0 +1,14 @@
package revoltgo
import (
"math/rand"
"time"
"github.com/oklog/ulid/v2"
)
func genULID() string {
t := time.Now()
entropy := ulid.Monotonic(rand.New(rand.NewSource(t.UnixNano())), 0)
return ulid.MustNew(ulid.Timestamp(t), entropy).String()
}