本文へ移動
cccskills
無料GitHub で公開日本語紹介

go

Goの`go`コマンドで、ビルドやテスト、モジュール・ワークスペース管理、コード生成、環境設定を進める方法を調べられます。カバレッジやプロファイル、ファジング、クロスコンパイルにも対応します。

原文原文の説明を見る

Use when working with the Go CLI (go command) — building, testing, modules, workspaces, environment, toolchain, generate, vet, coverage, profiling, fuzzing, cross-compilation, and internal tool commands. Triggers on: "go", "go build", "go test", "go mod", "go work", "go generate", "go vet", "go tool", "go get", "go install", "go run", "go clean", "go list", "go env", "go doc", "go fmt", "go fix", "go version", "go telemetry", "GOMODCACHE", "GOPROXY", "GOSUMDB", "GOPRIVATE", "GOTOOLCHAIN", "GOOS", "GOARCH", "CGO_ENABLED", "build constraint", "build tag", "go.mod", "go.sum", "go.work", "vendor", "pprof", "cover", "test2json", "buildjson", "GODEBUG", "GOEXPERIMENT", "minimal version selection", "MVS", "module proxy", "toolchain", "fuzzing", "race detector".

carapace-sh/carapace-binスター 2,000(GitHub 2,000 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Goプログラムをビルドしたいとき
  • テストやカバレッジの実行方法を調べたいとき
  • モジュールや依存関係を整理したいとき
  • 別のOS向けにクロスコンパイルしたいとき

日本語での紹介

できること

Goのgoコマンドを使う開発作業を調べられるリファレンスです。go buildやgo testのオプション、モジュールとgo.modの管理、複数モジュールを扱うワークスペース、環境変数やツールチェーンの設定を確認できます。コード生成、go vetによるチェック、カバレッジ、プロファイリング、ファジング、クロスコンパイルも対象です。関連するgo toolの使い方や、ビルド・テスト結果のキャッシュについても案内します。

こんなときに便利

Goプロジェクトのビルドやテストで使うフラグを知りたいとき、依存関係を追加・整理したいときに役立ちます。環境変数やビルドタグ、異なるOS・アーキテクチャ向けのコンパイル方法を確認したい場面にも向いています。goコマンドの仕組みから調べたい人にも使えます。

使い方の例

  • 「このGoプロジェクトの依存関係を整理するコマンドを教えて」
  • 「テストを実行してカバレッジを出す方法を確認して」
  • 「別のOS向けにクロスコンパイルする設定を調べて」

注意点

GoのテストAPIやpprofの詳しい使い方は対象外で、それぞれの公式ドキュメントが案内されています。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(9)

  • SKILL.md9.5 KB
  • references/build.md14.3 KB
  • references/cli.md17.5 KB
  • references/concepts.md9.5 KB
  • references/environment.md13.1 KB
  • references/mod.md16.4 KB
  • references/test.md13.8 KB
  • references/tool.md9.3 KB
  • references/work.md10.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Go CLI In-Depth Reference

Comprehensive reference for the go command-line tool — the driver for building, testing, module management, code generation, and toolchain operations in Go. Covers the module system, build flags, test framework, environment variables, workspaces, and the bundled go tool subcommands.

Data Flow

Source code (packages)
  → go build / go install (compile + link)
    → build cache (GOCACHE)
      → executable / archive

go.mod (module definition)
  → go get / go mod tidy (resolve dependencies)
    → module proxy (GOPROXY) / VCS (GOVCS)
      → module cache (GOMODCACHE)
        → go.sum (checksum verification, GOSUMDB)

go test (compile test binary)
  → go vet (automatic, subset)
    → test binary (pkg.test)
      → test cache (package list mode)
        → coverage profile / pprof profile / trace

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

KeywordsReference
concept, model, module, package, import path, GOPATH, GOROOT, GO111MODULE, module-aware mode, GOPATH mode, package pattern, all, std, cmd, tool, wildcard, ..., reserved package names, main package, test package, _test suffix, testdata, vendor, file types, .go, .c, .s, .syso, source file naming, *_GOOS, *_GOARCH, implicit build constraintreferences/concepts.md
go build, build flags, -o, -a, -n, -x, -p, -race, -msan, -asan, -cover, -covermode, -coverpkg, -v, -work, -asmflags, -buildmode, -buildvcs, -compiler, -gccgoflags, -gcflags, -installsuffix, -json, -ldflags, -linkshared, -mod, -modcacherw, -modfile, -overlay, -pgo, -pkgdir, -tags, -trimpath, -toolexec, build mode, archive, c-archive, c-shared, shared, exe, pie, plugin, PGO, profile-guided optimization, trimpath, cross-compilation, GOOS, GOARCH, build constraint, build tag, //go:build, // +build, buildjson, BuildEvent, shared build flags, -Creferences/build.md
go test, test flag, -run, -skip, -bench, -benchtime, -count, -failfast, -fullpath, -fuzz, -fuzztime, -fuzzminimizetime, -json, -list, -outputdir, -parallel, -short, -shuffle, -timeout, -v, -vet, -args, -c, -exec, -o, -cover, -covermode, -coverpkg, -coverprofile, -benchmem, -blockprofile, -blockprofilerate, -cpuprofile, -memprofile, -memprofilerate, -mutexprofile, -mutexprofilefraction, -trace, -artifacts, test2json, TestEvent, cacheable flags, local directory mode, package list mode, test caching, -count=1, fuzzing, seed corpus, testdata, fuzz cache, test binary, -test. prefix, testing functions, TestXxx, BenchmarkXxx, FuzzXxx, ExampleXxx, t.Parallel, -race, race detector, sanitizerreferences/test.md
go mod, mod init, mod tidy, mod download, mod edit, mod graph, mod vendor, mod verify, mod why, go.mod, go.sum, module path, module version, semver, semantic versioning, require, replace, exclude, retract, tool, ignore, godebug, indirect dependency, lazy module loading, minimal version selection, MVS, version query, @latest, @none, @patch, @v1.2.3, module cache, GOMODCACHE, modcacherw, vendor directory, vendor/modules.txt, -mod=vendor, -mod=readonly, -mod=mod, module-auth, go.sum, checksum, GOSUMDB, GOPRIVATE, GONOSUMDB, GONOPROXY, GOINSECURE, module proxy, GOPROXY, goproxy protocol, VCS, GOVCS, direct download, zip, .info, .mod, .zipreferences/mod.md
go tool, tool command, asm, cgo, compile, cover, fix, link, preprofile, vet, go tool vet, go tool cover, go tool pprof, go tool compile, go tool link, go tool asm, go tool cgo, -n, toolexec, tool definition, tool directive in go.mod, go tool resolution, builtin tools, additional tools, cmd/vet, vet analyzer, -vettool, vet checks, printf, atomic, bool, buildtags, directive, errorsas, ifaceassert, nilfunc, stringintconv, tests, shadow analyzer, -fix, -diff, go tool fix, fixer, hostportreferences/tool.md
go env, environment variable, GOARCH, GOOS, GOPATH, GOROOT, GOBIN, GOCACHE, GOCACHEPROG, GODEBUG, GOENV, GOFLAGS, GOINSECURE, GOMODCACHE, GOPRIVATE, GONOPROXY, GONOSUMDB, GOPROXY, GOSUMDB, GOTMPDIR, GOTOOLCHAIN, GOVCS, GOWORK, GO111MODULE, GOAUTH, GOEXPERIMENT, GOFIPS140, GOAMD64, GOARM, GOARM64, GO386, GOMIPS, GOMIPS64, GOPPC64, GORISCV64, GOWASM, CGO_ENABLED, CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS, CGO_FFLAGS, CGO_LDFLAGS, CC, CXX, FC, AR, PKG_CONFIG, GOEXE, GOGCCFLAGS, GOHOSTARCH, GOHOSTOS, GOMOD, GOTELEMETRY, GOTELEMETRYDIR, GOTOOLDIR, GOVERSION, go env -w, go env -u, go env -json, go env -changed, env config file, GOENVreferences/environment.md
go work, work init, work use, work sync, work edit, work vendor, go.work, workspace, use directive, replace directive, go directive, toolchain directive, godebug directive, GOWORK, workspace mode, multi-module, build list, sync, -r flag, GoWork JSON, Use struct, Replace struct, workspace vendorreferences/work.md
go generate, generate directive, //go:generate, generator, code generation, $GOFILE, $GOLINE, $GOPACKAGE, $GOARCH, $GOOS, $GOROOT, $DOLLAR, $PATH, -command, alias, -run, -skip, generated file convention, DO NOT EDIT, generate build tag, go get, go install, version suffix, @latest, @v1.0.0, module-aware install, GOBIN, go clean, clean flags, -cache, -testcache, -modcache, -fuzzcache, -i, -r, go run, -exec, go doc, doc flags, -all, -src, -short, -u, -cmd, -http, go fmt, gofmt, go fix, fix tool, go vet, vet flags, -vettool, -c, -json, go version, -m, -v, go telemetry, telemetry mode, go bugreferences/cli.md

Quick Guide

Cross-Project References

  • For cobra CLI development (commands, flags, completions), use the cobra skill (in this repo).
  • For carapace library development (Action API, traverse engine, shell formatters), use the carapace-dev skill (in this repo).
  • For carapace user-facing integration (specs, macros, setup), use the carapace skill (in this repo).
  • For Go testing framework internals (testing.T, testing.B, testing.F), see the Go testing package docs — this skill covers the go test command, not the testing API.
  • For pprof usage details beyond go tool pprof, see the pprof docs.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

brew

無料概要あり

macOSやLinuxのHomebrewについて、brewコマンドでの導入・更新から、FormulaやCask、Brewfile、サービス管理、開発者向け操作まで調べられるスキルです。

  • Homebrewでソフトを導入・更新したいとき
  • Brewfileで環境を管理したいとき
  • FormulaやCaskを作成・更新したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bubbletea

無料概要あり

Go製TUIフレームワークBubble Teaの画面構成、入力・非同期処理、テスト、部品の組み合わせ方を調べ、端末アプリの実装や設計に活用できます。

  • Bubble Teaで端末画面を作りたいとき
  • キーやマウス入力を処理したいとき
  • 非同期処理を画面に組み込みたいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

bun

無料概要あり

BunのCLI、パッケージ管理、テスト、バンドル、実行時APIやシェルの使い方を調べ、JavaScript・TypeScriptの開発作業に活用できます。

  • Bunで依存パッケージを管理したいとき
  • テストやコードのバンドルを実行したいとき
  • Bunでサーバーやファイル処理を実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

but

無料概要あり

GitButler CLIで仮想ブランチや積み重ねたブランチを管理し、変更の割り当て、コミット編集、競合解決、PR作成までのGit作業を進められます。

  • 作業を仮想ブランチに分けたいとき
  • コミットを修正・統合したいとき
  • 操作履歴を見て変更を取り消したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace

無料概要あり

carapaceをCLIに組み込み、シェル補完のYAML仕様や独自アクションを作成し、シェル設定やMCP連携、補完値の説明まで扱うスキルです。

  • CLIにシェル補完を追加したいとき
  • YAMLの補完仕様を作成したいとき
  • 独自の補完アクションを実装したいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

cargo

無料概要あり

Rustプロジェクトのビルドやテストから、依存関係、ワークスペース、公開設定まで、`cargo`の使い方と設定を調べられるスキルです。

  • Rustプロジェクトの依存関係を設定したいとき
  • featureやworkspaceの仕組みを確認したいとき
  • ビルドやテストのコマンドを調べたいとき
carapace-sh/carapace-bin2,0002026年10月26日 更新

carapace-sh のスキルをすべて見る

このスキルの問題を報告する