Closed elipavlov closed 3 years ago
It has switched to index array implementation which borrowed from a library which mentioned in commit message and comments of the actual change.
Benchmark comparison is here: https://github.com/elipavlov/govalidator/pull/1
go test -bench BenchmarkIsULID -benchmem
pkg: github.com/asaskevich/govalidator
BenchmarkIsULID_RE-4 4085954 281 ns/op 92.41 MB/s 0 B/op 0 allocs/op
BenchmarkIsULID-4 60308574 17.5 ns/op 1482.27 MB/s 0 B/op 0 allocs/op
PASS
ok github.com/asaskevich/govalidator 2.880s
Thank you!
Description
It adds a validator for the ULID format.
I'm going to add support for this string format to go swagger library. Since strfmt uses this library I've decided to start from here.