mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 04:52:24 -05:00
start working on struct validation for gtsmodel
This commit is contained in:
parent
7d193de25f
commit
d2276fc553
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