Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC] Remove prefix param when possible (#223)
## Summary This change removes the prefix param from `FromUUID` and `FromUUIDBytes`. It follows the philosophy that the correct path should be easy (and the bad path should be less easy). Previously to convert a UUID you must do: ```golang // Previously (ugly) typeid.FromUUID[idType](idType{}.Prefix(), uuid) // Or potential bug, pass a string typeid.FromUUID[idType]("typePrefix", uuid) // After this change typeid.FromUUID[idType](uuid) ``` Benefits: * less code in the correct path. * Much better type checking and less opportunity for miss-use. No way to pass a bad prefix. Downside: * AnyIDs are a bit longer and uglier. * Extra functions Open to renaming `AnyPrefixFromUUID` to something better. Maybe `FromUUIDWithPrefix` ? or `FromPrefixAndUUID` ? ## How was it tested? * builds, tests
- Loading branch information