start working on struct validation for gtsmodel

This commit is contained in:
tsmethurst 2021-08-29 16:52:23 +02:00 committed by tsmethurst
commit d2276fc553
10 changed files with 407 additions and 125 deletions

View file

@ -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)