> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/golang.md).

# Golang

### Remove Debugging Information

```
go build -ldflags "-w -s"
```

* that will remove the debugging information and shrink the binary size by \~30%.

### Cross Compilation

* `GOOS` -> Operating system
* `GOARCH` -> Architecture

```
GOOS="linux" GOARCH="amd64" go build hello.go
```
