mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 04:48:07 -06:00
start working on struct validation for gtsmodel
This commit is contained in:
parent
53507ac2a3
commit
8aa72f995f
10 changed files with 407 additions and 125 deletions
|
|
@ -10,6 +10,8 @@ import (
|
|||
|
||||
const randomRange = 631152381 // ~20 years in seconds
|
||||
|
||||
type ULID string
|
||||
|
||||
// NewULID returns a new ULID string using the current time, or an error if something goes wrong.
|
||||
func NewULID() (string, error) {
|
||||
newUlid, err := ulid.New(ulid.Timestamp(time.Now()), rand.Reader)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue