I compile the following Go program on a linux/amd64 box:
package main
import (
"fmt"
"os/user"
)
func main() {
fmt.Println(user.Current())
}
This works fine. But when I cross compile it from a Mac box, I get the following error when I run that program on my linux box:
user: Current not implemented on linux/amd64
How can I cross compile and use the Current function in package os/user?
Edit 1: I should add that these are the instructions I've used to setup cross compiling on my Mac box: https://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling
Edit 2: cross compiling for windows/386 works fine.