Closed esco closed 3 years ago
Looks like it was kept in a refactor from an external contribution, and missed in review.
@theckman I asked you about it in slack a year (?) ago (when the project was initially forked) and your response was to have it here just in case if it ever needed to not break the API.
I thought that was the case, but couldn't find the conversation so I didn't want to commit to that.
I see, @theckman would you say it's safe to simply use a blank identifier for the error value and proceed as if an error isn't possible?
@esco I wouldn't be comfortable saying that. Since it wouldn't require an API change, I could see us making a change that could cause that to start returning an error. In that case a minor version upgrade would break your code.
The assumption is that Gophers handle any error values that are returned to them, and so under SemVer having this return more errors would probably be considered a backwards compatible change.
Makes sense. Thanks for the insight and quick response!
Hi @esco , thank you very much for the question. Its looking like this discussion is resolved (for now) so I'm going to close the issue. If you have anything else you'd like to enquire about this topic please feel free to keep posting!
Have a good one
When parsing a
time.Time
value from a v1 uuid usingUUID.TimestampFromV1
, theTimestamp.Time
function is called. This function only ever returns anil
error. Why does this function have an error for the second return argument when one can't ever be produced?https://github.com/gofrs/uuid/blob/094e8c20495e85b2066fb9e69159b0f3fc066bca/uuid.go#L72-L85