[Go] Write a built executable to a specific location

Created on November 30, 2026

Use go build -o to choose where Go writes the compiled executable. With an existing directory as the output path, this example writes the executable into /tmp.

go build -o /tmp/
Go