The reason is that Go is a compiled language. Meaning that you can’t take the Compile.exe file, which you make using go build, and expect it to run on other operating systems. You should create multiple Compiled files for each operating system or run the code directly “Go run” and let Go compile the file according to the current OS (Which will take extra time for Go to execute the code as it needs to compile it)
I think there was a solution for this like encoding utf-8 or something but I can’t really remember it, sorry
Based on the error message, it’s best you raise a bug issue ticket on their GVCS (e.g. Github) to address the issue. Please remember to read their contributing guidelines.
The error log is very specific to data type mismatch which is source code problem.
This “monkey patching” only works if you’re in development phase where you are exploring and developing something. The error you found is not feasible for deploying into production. Hence, address the issues to the maintainers will be the strategic step.
You are right about the Go “cross-OS” deployment. However, it’s not the UTF-8 encoding that blocks it.
Every OS has their own specific ABI (abstracted binary interface). Hence, this is the reason why you need to compile your program for each OS.