Development v1.0.0

go-install

name: go-install version: 1.0.0 description: Install Go compiler on Linux for Go project compilation and testing ---

solidexu 更新于 2026-03-09 1 浏览
下载 SKILL

技能说明

name: go-install version: 1.0.0 description: Install Go compiler on Linux for Go project compilation and testing ---

使用场景

name: go-install version: 1.0.0 description: Install Go compiler on Linux for Go project compilation and testing ---

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/go-install
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 19 kB
SKILL.md text/markdown
--------------------------0aa845c205f28859
Content-Disposition: form-data; name="file"; filename="SKILL.md"
Content-Type: application/octet-stream

---
name: go-install
version: 1.0.0
description: Install Go compiler on Linux for Go project compilation and testing
---

# Go Compiler Installation

Install Go compiler on Linux for Go project development, compilation, and testing.

## Use Cases

- Go project development
- Running unit tests
- Compiling Go programs

## Installation Steps

### 1. Check System Architecture

```bash
uname -m
# x86_64 = amd64
# aarch64 = arm64
```

### 2. Download and Install

**amd64 (x86_64):**
```bash
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):**
```bash
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. Configure Environment Variables

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

### 4. Persist Configuration

Add to `~/.bashrc` or `~/.profile`:

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

### 5. Verify Installation

```bash
go version
go env GOPATH GOROOT
```

## Common Commands

```bash
# Run tests
go test ./...

# Run tests with verbose output
go test ./... -v

# Build project
go build -o <output> ./cmd/<entry>

# Download dependencies
go mod download

# Tidy dependencies
go mod tidy
```

## Resource Requirements

| Item | Value |
|------|-------|
| Download Size | ~65MB |
| Extracted Size | ~300MB |
| Memory | 512MB minimum |
| CPU | Single core sufficient |

## Notes

1. Go has no runtime dependencies, single binary
2. Extremely fast compilation, ideal for CI/CD
3. Recommended to use LTS version (e.g., 1.22.x)
4. GOPATH directory is auto-created

## Version Selection

| Version | Description |
|---------|-------------|
| go1.22.x | LTS stable (recommended) |
| go1.21.x | Previous stable |
| go1.23.x | Latest |

Download: https://go.dev/dl/
--------------------------0aa845c205f28859--

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。