diff --git a/go.go b/go.go index b0633e7..741c1c7 100644 --- a/go.go +++ b/go.go @@ -34,6 +34,8 @@ type CompileOpts struct { // GoCrossCompile func GoCrossCompile(opts *CompileOpts) error { + os.Unsetenv("GOOS") + os.Unsetenv("GOARCH") env := append(os.Environ(), "GOOS="+opts.Platform.OS, "GOARCH="+opts.Platform.Arch)