uuid
ulid
uuid | ulid | |
---|---|---|
7 | 11 | |
1,519 | 4,181 | |
1.9% | 2.9% | |
4.3 | 4.5 | |
6 days ago | about 1 month ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
uuid
-
satori uuid vs google uuid vs gofrs uuid ? which to use to generate uuid for enterprise coding standards
https://github.com/gofrs/uuid upto v5
-
Any way of blocking or preferring a package?
I use Google's UUID package a lot. But every time I refer to it in a new package, the language server picks up https://github.com/gofrs/uuid instead of https://github.com/google/uuid and then complains that the gofrs package isn't in go.mod. I assume because it's the first alphabetically (though this seems like a huge supply chain security loophole).
-
cmackenzie1/go-uuid: library for generating version 4 (random) and version 7 (time-ordered) UUIDs
What makes this different than https://github.com/gofrs/uuid ?
-
Building web-based SaaS with Go as a solo entrepreneur. What should I be aware of?
Something to note is that all of this is still open source. Theoretically, someone can decide to fork SQLBoiler and add all the missing things, or send in a PR. A good example is that the current most popular uuid package. gofrs/uuid was forked from an unmaintained previously popular package.
-
Which UUID package do you use? and why?
You could also look at github.com/gofrs/uuid which includes support for v6 and v7 from the latest draft UUID spec. Personally I think the API for this library is nicer since the google one makes it difficult to tell what kind of UUID you are generating.
-
Example Golang RESTful API (Fully Containerized Local Development)
Postgres has native UUID support so don't use VARCHAR(36). Look at https://github.com/gofrs/uuid library, among others, to create uuid.
-
CVE-2021-3538 issued for latest release of github.com/satori/go.uuid
If you're using this library and are unsure what to do, a few of us maintain a fork of this library that has fixed these issues (and others): https://github.com/gofrs/uuid
ulid
-
Nanosecond timestamp collisions are common
Our Go ULID package has millisecond precision + monotonic random bytes for disambiguation while preserving ordering within the same millisecond. https://github.com/oklog/ulid
-
Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
There is no "tests".
There is just a single test. Which only tests the decoding of a single known value. No encoding test.
Go has infrastructure for benchmarking and fuzzing. Use it!
Also, you took code from https://github.com/oklog/ulid/blob/main/ulid.go which has "Copyright 2016 The Oklog Authors" but this is not mentionned in your base32.go.
-
cmackenzie1/go-uuid: library for generating version 4 (random) and version 7 (time-ordered) UUIDs
maybe because of dependencies: https://github.com/oklog/ulid/blob/main/go.mod ??
- The most helpful Go Packages
-
UUIDs Are Bad for Database Index Performance, enter UUID7!
Universally Unique Lexicographically Sortable Identifier
-
Is it bad to use short (20 chars) random strings as primary keys?
I'm not concerned too much about the performance or the storage size at this stage. I've checked ulids before posting (more specifically https://github.com/oklog/ulid) but the only difference than a random string (especially if you use them with math.rand) is the timestamp prefix which makes them sortable, but I don't need that (users could use the internal SQLite rowid if they needed to sort by a primary key).
- UUIDs Are Popular, but Bad for Performance
-
Golang Base Project - A simple web app with user authentication
why are you using https://github.com/oklog/ulid to generate a cookie secret?
-
What are your favorite packages to use?
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
Keyset pagination using UUID v4 mongodb go
If you just want to roll with an off-the-shelf library, you can use ULID. There are tons of custom made *flake alternatives. If ULID doesn't fit your purposes, look for others.
What are some alternatives?
uuid - Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
nanoid - A tiny and fast Go unique string generator
shortuuid - :mushroom: A generator library for concise, unambiguous and URL-safe UUIDs
xid - xid is a globally unique id generator thought for the web
go.uuid - UUID package for Go
gouid - Fast, dependable universally unique ids
fastuuid - FastUUID is a library which provides CPython bindings to Rust's UUID library
sno - Compact, sortable and fast unique IDs with embedded metadata.
bob - SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite
Monoton - Highly scalable, single/multi node, sortable, predictable and incremental unique id generator with zero allocation magic on the sequential generation
go-nanoid - Nano ID for Go
goflake - A highly scalable and serverless unique ID generator for use in distributed systems. Written in GoLang. Inspired by Twitters Snowflake.