diff --git a/docs/study/program/Golang/index.md b/docs/study/program/Golang/index.md index 81df197bd..c82607c3e 100644 --- a/docs/study/program/Golang/index.md +++ b/docs/study/program/Golang/index.md @@ -137,6 +137,30 @@ func init() { - GOARCH:目标平台的体系架构32位还是64位(386、amd64、arm) - 交叉编译不支持 CGO 所以要禁用它 +1. GOARCH(目标平台架构)可能的值: + - `amd64`:64位 x86 架构 + - `386`:32位 x86 架构 + - `arm`:ARM 架构(32位) + - `arm64`:ARM64 架构(64位) + - `ppc64`:64位 PowerPC 架构 + - `ppc64le`:64位小端 PowerPC 架构 + - `mips64`:64位 MIPS 架构 + - `mips64le`:64位小端 MIPS 架构 + - `s390x`:64位 IBM z/Architecture + +2. GOOS(目标平台操作系统)可能的值: + - `linux`:Linux 操作系统 + - `windows`:Windows 操作系统 + - `darwin`:macOS 操作系统 + - `freebsd`:FreeBSD 操作系统 + - `netbsd`:NetBSD 操作系统 + - `openbsd`:OpenBSD 操作系统 + - `dragonfly`:DragonFly BSD 操作系统 + - `solaris`:Solaris 操作系统 + - `plan9`:Plan 9 操作系统 + - `aix`:IBM AIX 操作系统 + + ### CGO - [CGO:让Go程序调用C函数的神器](https://blog.csdn.net/qq_42538588/article/details/131167683)