Open gjrtimmer opened 5 years ago
I have merged this in my new and supported version that is a drop in replacement. A long with go mod
support. If your interested.
https://github.com/dmarkham/enumer
While I agree that having a .exe
file in a non-Window machine is weird, it doesn't cause any issue. If the reason for the change is purely a cosmetic matter, I would rather not add more code.
Let me know if there is any other reason. Thanks!
@alvaroloes There is a real reason for it not cosmetic.
I'm using Windows and Linux for development. There is however a real issue for which I have submitted this.
When I develop on Windows I'm using VSCode as my IDE editor. But for my terminal / compiling I'm using WSL (Windows Linux Subsystem) ability to use a bash terminal on Windows, and Windows cmd
for running / compiling the same project as Windows binaries.
I'm using this for crossplatform development. It allows me to develop for Windows and Linux and test both at the same time. My code base GOPATH
is the same for my Windows and Linux. Both are using the same folder on my filesystem.
This PR was created because of the following problem.
When I'm using Windows cmd
I run my Windows tests and it uses the real .exe
which was compiled by Windows cmd
. The enumer.exe is a Windows binary. When I use my bash console on the same Windows machine and compile it tries to use the enumer.exe
(Windows compiled) binary while it should use the enumer
binary in GOPATH\bin
. Which causes errors and I have to manually recompile the enumer binary everything I switch between windows and linux builds.
So my GOPATH\bin looks like
I hope this makes sense and clarifies for you why I need it. Crossplatform development without this PR is quite frustrating.
I really hope you will consider this PR.
Binary name for string was hardcoded to
.exe