Content Preview
---
name: golang-testing
description: テスト駆動開発とGoコードの高品質を保証するための包括的なテスト戦略。
---
# Go テスト
テスト駆動開発(TDD)とGoコードの高品質を保証するための包括的なテスト戦略。
## いつ有効化するか
- 新しいGoコードを書くとき
- Goコードをレビューするとき
- 既存のテストを改善するとき
- テストカバレッジを向上させるとき
- デバッグとバグ修正時
## 核となる原則
### 1. テスト駆動開発(TDD)ワークフロー
失敗するテストを書き、実装し、リファクタリングするサイクルに従います。
```go
// 1. テストを書く(失敗)
func TestCalculateTotal(t *testing.T) {
total := CalculateTotal([]float64{10.0, 20.0, 30.0})
want := 60.0
if total != want {
t.Errorf("got %f, want %f", totHow to Use
Recommended: Install to project (local)
mkdir -p .claude/skills
curl -o .claude/skills/golang-testing.md \
https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/ja-JP/skills/golang-testing/SKILL.mdSkill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.
Alternative: Clone full repo
git clone https://github.com/affaan-m/everything-claude-codeThen reference at docs/ja-JP/skills/golang-testing/SKILL.md
Related Skills
grpc-golang
Build production-ready gRPC services in Go with mTLS, streaming, and observability. Use when designing Protobuf contracts with Buf or implementing secure service-to-service transport.
securitygrpcgolang
by sickn33 (Antigravity) · antigravity-awesome-skills
golang-patterns
堅牢で効率的かつ保守可能なGoアプリケーションを構築するための慣用的なGoパターン、ベストプラクティス、規約。
golang-patternsgolangpatternsgo
by affaan-m · everything-claude-code
dbos-golang
Guide for building reliable, fault-tolerant Go applications with DBOS durable workflows.
developmentdbosgolang
by sickn33 (Antigravity) · antigravity-awesome-skills
golang-pro
Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices.
developmentgolang
by sickn33 (Antigravity) · antigravity-awesome-skills