Since Dec 12, 2023 there is a new feature to validate directly by string: https://github.com/google/uuid/commit/9ee7366e66c9ad96bab89139418a713dc584ae29
var string anyUUID = "elmo"
err := uuid.Validate(anyUUID) // will result in an error
Live example: https://go.dev/play/p/QIzW63S0Oda
This is very useful when it comes to testing:
assert.NoError(t, uuid.Validate(anyUUID))