go-table-driven-tests
Go Table-Driven Tests
Use this skill when writing or modifying Go table-driven tests. It ensures tests follow established patterns.
Core Principles
- One test function, many cases - Define test cases in a slice and iterate with
t.Run() - Explicit naming - Each case has a
namefield that becomes the subtest name - Structured inputs - Use struct fields for inputs, expected outputs, and configuration
- Helper functions - Use
t.Helper()in test helpers for proper line reporting - Environment guards - Skip integration tests when credentials are unavailable
Table Structure Pattern
More from tigrisdata/skills
tigris-object-operations
Use when working with objects in Tigris Storage - uploading, downloading, deleting, listing, getting metadata, or generating presigned URLs
70tigris-bucket-management
Use when creating, listing, inspecting, or deleting Tigris Storage buckets
67tigris-snapshots-forking
Use when needing point-in-time recovery, version control for object storage, or creating isolated bucket copies for testing/experimentation
64conventional-commits
Use when creating git commits, writing commit messages, or following version control workflows
62file-storage
Use when working with Tigris file storage - uploading, downloading, deleting, listing files, presigned URLs, client uploads, or setting up Tigris CLI and SDK. Covers Next.js, Remix, Express, Rails, and Laravel. For Python/Django, see the tigris-python-sdk skill.
42installing-tigris-storage
Use when setting up @tigrisdata/storage in a new project or configuring authentication and bucket access
37