Back to list
joeyagreco

golang-testing

by joeyagreco

my setup

2🍴 0📅 Jan 23, 2026

SKILL.md


name: golang-testing description: GoLang testing guidelines

Golang Testing

Instructions

When writing Go tests, always use table-driven test format.

Structure

func TestFunctionName(t *testing.T) {
	tests := []struct {
		name     string
		input    inputType
		expected expectedType
		wantErr  bool
	}{
		{
			name:     "description of test case",
			input:    inputValue,
			expected: expectedValue,
			wantErr:  false,
		},
		// additional test cases...
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			// test implementation
		})
	}
}

When to Use

Apply this format when:

  • Writing new Go tests
  • Refactoring existing Go tests
  • Adding test cases to existing tests

Score

Total Score

55/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon