Are Golang binaries portable?

  1. Yes it will; this is true of basically all binaries compiled for 64-bit Linux, not just those written in Go (except for shared libraries, which Go doesn’t rely on)
  2. You can set the GOOS and GOARCH environment variables before building: GOOS=windows GOARCH=386 go build (or go install or whatever), etc
  3. By default a binary will be built for the system you’re running, but this isn’t necessary – see 2

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)