内部版本不包含带有文件后缀的源

Compiling under ubuntu

Linux ip 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

with golang version

go version go1.8.3 linux/amd64

The files I have:

daemon_darwin.go daemon_freebsd.go daemon.go daemon_linux.go daemon_windows.go LICENSE os.go README.md

The command I'm executing

GOOS=darwin GOARCH=amd64 go build -x

The output I'm getting

WORK=/tmp/go-build026556308 mkdir -p
$WORK/github.com/VividCortex/godaemon/_obj/ mkdir -p
$WORK/github.com/VividCortex/ cd
/root/go/src/github.com/VividCortex/godaemon
/home/jenkinsBuilder/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.8/pkg/tool/linux_amd64/compile
-o $WORK/github.com/VividCortex/godaemon.a -trimpath $WORK -p github.com/VividCortex/godaemon -complete -buildid
398bd35cdb7ed0aa42a3e6ea64677925441c29cb -D
_/root/go/src/github.com/VividCortex/godaemon -I $WORK -pack ./daemon.go ./os.go
# github.com/VividCortex/godaemon ./daemon.go:167: undefined: GetExecutablePath

we can see that daemon_darwin.go is not being included in the compile command, although I've added GOOS=darwin

If I try using GOOS=windows, it builds correctly, and daemon_windows.go is being added