goshort/internal/storage/models/shared.go
Gustavo Maronato f06e933a80
Some checks failed
Build / build (push) Failing after 6m2s
remove unused go stuff
2023-08-30 21:33:57 -03:00

19 lines
297 B
Go

package models
import (
randomutil "git.maronato.dev/maronato/goshort/internal/util/random"
)
const (
// IDLength is the length of IDs.
IDLength = 16
)
func NewID() string {
return randomutil.GenerateSecureToken(IDLength)
}
func LooksLikeID(id string) bool {
return len(id) == IDLength
}