Skip to content

Golang

安装Go

Windows

  1. 使用scoop安装

scoop install main/go

  1. 从官网下载安装

    Download and install - The Go Programming Language

Linux

  1. 使用apt安装(但是可能不是最新版本)

  2. 通过压缩包的方式安装

    Download and install - The Go Programming Language

配置代理

Goproxy.cn

image-20251013151803321

交叉编译(以Windows系统为例)

编译Linux程序

bash
$env:GOOS="linux"
go build