← 返回 Skills 市场
solidexu

Go 安装

作者 solidexu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
281
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install go-install-zh
功能描述
在 Linux 系统安装并配置 Go 编译器,支持 Go 项目编译、测试及依赖管理操作。
使用说明 (SKILL.md)

name: go-install-zh version: 1.0.0 description: 在 Linux 环境安装 Go 编译器,用于 Go 项目编译和测试

Go 编译器安装

在 Linux 环境安装 Go 编译器,用于 Go 项目编译和测试。

适用场景

  • Go 项目开发
  • 运行单元测试
  • 编译 Go 程序

安装步骤

1. 确认系统架构

uname -m
# x86_64 = amd64
# aarch64 = arm64

2. 下载并安装

amd64 (x86_64):

cd /tmp
curl -LO https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
tar -xzf go1.22.0.linux-amd64.tar.gz
mv go ~/go-sdk
rm go1.22.0.linux-amd64.tar.gz

arm64 (aarch64):

cd /tmp
curl -LO https://go.dev/dl/go1.22.0.linux-arm64.tar.gz
tar -xzf go1.22.0.linux-arm64.tar.gz
mv go ~/go-sdk
rm go1.22.0.linux-arm64.tar.gz

3. 配置环境变量

export PATH=$PATH:~/go-sdk/bin
export GOPATH=~/go
export GOROOT=~/go-sdk

4. 持久化配置

添加到 ~/.bashrc~/.profile

echo 'export PATH=$PATH:~/go-sdk/bin' >> ~/.bashrc
echo 'export GOPATH=~/go' >> ~/.bashrc
echo 'export GOROOT=~/go-sdk' >> ~/.bashrc

5. 验证安装

go version
go env GOPATH GOROOT

常用命令

# 运行测试
go test ./...

# 运行测试(详细输出)
go test ./... -v

# 编译项目
go build -o \x3Coutput> ./cmd/\x3Centry>

# 下载依赖
go mod download

# 整理依赖
go mod tidy

资源需求

项目 数值
安装包大小 ~65MB
解压后大小 ~300MB
内存需求 最低 512MB
CPU 需求 单核即可

注意事项

  1. Go 无运行时依赖,单二进制文件
  2. 编译速度极快,适合 CI/CD
  3. 建议使用 LTS 版本(如 1.22.x)
  4. GOPATH 目录会自动创建

版本选择

版本 说明
go1.22.x LTS 稳定版(推荐)
go1.21.x 旧稳定版
go1.23.x 最新版

下载地址: https://go.dev/dl/\r --------------------------80187b9f2f8945b5--\r

安全使用建议
This is a straightforward, coherent install guide for Go on Linux. Before running the suggested commands: 1) consider verifying the downloaded tarball checksum or signature from the official Go releases page to reduce supply-chain risk; 2) decide whether to install to ~/go-sdk (user-local) or a system location like /usr/local (may require sudo); 3) explicitly create your GOPATH directory if you want it now (mkdir -p ~/go); and 4) review appended lines in ~/.bashrc and reload your shell (source ~/.bashrc) or log out/in. Avoid running commands from unknown sources without verifying URLs and checksums.
功能分析
Type: OpenClaw Skill Name: go-install-zh Version: 1.0.0 The skill bundle provides standard, legitimate instructions for installing the Go compiler on Linux. It downloads the official SDK from go.dev, configures environment variables in ~/.bashrc, and includes basic verification steps, with no evidence of malicious intent or suspicious behavior in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name/description (install and configure Go on Linux) match the instructions: downloading Go tarball from go.dev, extracting to ~/go-sdk, and setting PATH/GOPATH/GOROOT for development and testing.
Instruction Scope
Instructions stay within the stated purpose and do not ask for unrelated files or credentials. Minor issues: the guide does not include checksum or signature verification for the downloaded tarball (a recommended hardening step), and it asserts "GOPATH directory will be auto created" without explicitly creating ~/go; also recommends using ~/go-sdk rather than common system locations (which is a user choice).
Install Mechanism
No install spec or code files; downloads are from the official go.dev domain (expected for this purpose). No archive extraction to privileged locations and no elevated (sudo) operations are suggested.
Credentials
No environment variables, credentials, or config paths are requested beyond setting PATH/GOPATH/GOROOT for the user's shell — all proportional to installing and using Go.
Persistence & Privilege
Skill is user-invocable and not always-enabled; it does not request persistent elevated privileges or modify other skills/configs. The recommended changes are limited to the user's shell rc file.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install go-install-zh
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /go-install-zh 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
首次发布 - 中文版
元数据
Slug go-install-zh
版本 1.0.0
许可证 MIT-0
累计安装 4
当前安装数 3
历史版本数 1
常见问题

Go 安装 是什么?

在 Linux 系统安装并配置 Go 编译器,支持 Go 项目编译、测试及依赖管理操作。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 281 次。

如何安装 Go 安装?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install go-install-zh」即可一键安装,无需额外配置。

Go 安装 是免费的吗?

是的,Go 安装 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Go 安装 支持哪些平台?

Go 安装 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Go 安装?

由 solidexu(@solidexu)开发并维护,当前版本 v1.0.0。

💬 留言讨论