Closed npostulart closed 8 years ago
Yes you are right. I have the same issue:
I think I did not notice it before because I mostly develop on my Mac and never use the cross-compiled version from allmark.io.
The Error: user: Current not implemented on darwin/amd64
error seems to be a known golang issue: https://github.com/golang/go/issues/6376
... and they closed it as "WorkingAsIntended" :disappointed: Apparently the solution is to build natively on Mac OS.
And that's what I did for now. I exchanged the binary for Mac OS with one that I built on my Mac. If you download the darwin/amd64 binary again it should work:
curl -O https://allmark.io/bin/darwin/amd64/allmark
chmod +x allmark
./allmark
But since this is not a good solution I will further investigate alternative solutions for determining the users home directory. Until then I will leave this issue open.
It's fixed.
The reason for the error was that I did not anticipate user.Current()
to fail during cross compilation. Apparently os/user relies on cgo, and cgo is disabled for cross compiling.
Since this is, for some reasons unclear to me, intended
behaviour by go (see: golang/go#6376) I used Mitchell Hachimoto's go-homedir library for determining the current users home directory path instead of using user.Current()
.
If you now download the binaries for Mac OS from allmark.io/bin/darwin it should work.
Using the binary provided I get the error
Building the application from source works for me even if the test run results in an error.