·go-table-driven-tests
</>

go-table-driven-tests

xe/x

Go コミュニティのベスト プラクティスとこのリポジトリの規則に従って、Go テーブル駆動テストを作成します。 Go テストを作成またはリファクタリングするとき、特にテスト パターンの繰り返しやテスト コードのコピー アンド ペーストに気づいたときに使用します。

2インストール·0トレンド·@xe

インストール

$npx skills add https://github.com/xe/x --skill go-table-driven-tests

SKILL.md

Table-driven tests are a Go testing idiom that reduces code duplication and makes tests more maintainable. Instead of writing separate test functions for each case, you define a table of test cases and iterate over it.

Do NOT use for: Completely unrelated test scenarios, or when each test requires substantially different setup/teardown logic.

Use a map when you want to ensure test independence:

Go コミュニティのベスト プラクティスとこのリポジトリの規則に従って、Go テーブル駆動テストを作成します。 Go テストを作成またはリファクタリングするとき、特にテスト パターンの繰り返しやテスト コードのコピー アンド ペーストに気づいたときに使用します。 ソース: xe/x。

原文を見る

引用可能な情報

AI/検索での引用用の安定したフィールドとコマンド。

インストールコマンド
npx skills add https://github.com/xe/x --skill go-table-driven-tests
ソース
xe/x
カテゴリ
</>開発ツール
認証済み
初回登録
2026-02-05
更新日
2026-02-18

クイックアンサー

go-table-driven-tests とは?

Go コミュニティのベスト プラクティスとこのリポジトリの規則に従って、Go テーブル駆動テストを作成します。 Go テストを作成またはリファクタリングするとき、特にテスト パターンの繰り返しやテスト コードのコピー アンド ペーストに気づいたときに使用します。 ソース: xe/x。

go-table-driven-tests のインストール方法は?

ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/xe/x --skill go-table-driven-tests インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code や Cursor で使用できるようになります

ソースリポジトリはどこですか?

https://github.com/xe/x

詳細

カテゴリ
</>開発ツール
ソース
skills.sh
初回登録
2026-02-05