Skip to content

Go Tutorial

  • Lessons
  • News
  • Blog
  • About
Go Tutorial
Go Tutorial

Go Tutorial

  • Lessons
  • News
  • Blog
  • About

Blog

How to shrink a Go executable

November 8, 2026
shrink go executable

Measured on Go 1.27: how -ldflags=”-s -w” and -trimpath shrink a Go binary, what you give up, and the trade-offs of compressing it with UPX.

Categories Blog Tags build, shrink, upx
Go Tutorial · free Go lessons by Erik · also see Python LandAbout · Contact · Privacy policy · Not affiliated with the Go project or Google