You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see a consistent result. One of the following would have worked, so long as it were deterministic:
[.jpg]
[.jpeg]
[.jpg .jpeg]
[.jpeg .jpg]
What did you see instead?
I saw either [.jpg] or [.jpeg], which changed as I re-ran the program.
Perhaps these extensions are completely interchangeable, but I think they should be deterministic. This affects e.g. unit tests which rely on ExtensionsByType somewhere in the code path.
(Personally, I prefer .jpg over .jpeg.)
The text was updated successfully, but these errors were encountered:
A fix was cherry-picked back in Feb 25, but seems like it didn't find its way in the initial Go 1.14.3 tag. I don't know if it was backported in a later stage, or if it will just be released alongside 1.15.
Could you try re-running your example with the latest version of Go, maybe using gotip? It seems to be working correctly for me.
EDIT: Here's what I'm getting from building what's currently in the master branch and the playground example.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran the following code:
https://play.golang.org/p/oVTZQTyxzS_q
The relevant bit is here:
What did you expect to see?
I expected to see a consistent result. One of the following would have worked, so long as it were deterministic:
[.jpg]
[.jpeg]
[.jpg .jpeg]
[.jpeg .jpg]
What did you see instead?
I saw either
[.jpg]
or[.jpeg]
, which changed as I re-ran the program.Perhaps these extensions are completely interchangeable, but I think they should be deterministic. This affects e.g. unit tests which rely on
ExtensionsByType
somewhere in the code path.(Personally, I prefer
.jpg
over.jpeg
.)The text was updated successfully, but these errors were encountered: