{
  "skill_name": "golang-testing",
  "evals": [
    {
      "id": 1,
      "prompt": "How do I write a table-driven unit test for a Go function that parses order status?",
      "expected_output": "Define a slice of struct test cases with name, input, and expected. Use t.Run(tc.name, func(t *testing.T) { ... }) to iterate. Use testify assert or require for assertions.",
      "assertions": [
        { "type": "contains", "value": "t.Run" },
        { "type": "contains", "value": "struct" }
      ]
    },
    {
      "id": 2,
      "prompt": "My Go service depends on a database. How do I unit test it without a real DB?",
      "expected_output": "Define a repository interface and inject it. In tests, pass a mock that implements the interface. Use mockery to auto-generate mocks or write manual mocks for simple cases.",
      "assertions": [
        { "type": "contains", "value": "interface" },
        { "type": "contains", "value": "mock" }
      ]
    },
    {
      "id": 3,
      "prompt": "I'm using assert inside a for loop in my Go test. Is this OK?",
      "expected_output": "No. Use t.Run for each iteration so failures are isolated and the test name is clear. assert inside a bare loop continues past failures, making it hard to identify which case failed.",
      "assertions": [
        { "type": "contains", "value": "t.Run" },
        { "type": "contains", "value": "isolated" }
      ]
    }
  ],
  "should_not_trigger": [
    "How do I set up an Echo HTTP server in Go?",
    "Configure golangci-lint for my Go project",
    "Write a Dockerfile for a Go service"
  ]
}
