diff --git a/go/.config/vim/snips/go.snippets b/go/.config/vim/snips/go.snippets index 19ca2f7..2050d38 100644 --- a/go/.config/vim/snips/go.snippets +++ b/go/.config/vim/snips/go.snippets @@ -10,15 +10,32 @@ endsnippet snippet test "setup test case" ! func Test${1}(t *testing.T) { type testcase struct { - name string - setup func(tc *testcase) + Name string + Setup func(tc *testcase) } tt := []testcase{} for _, tc := range tt { tc := tc - t.Run(tc.name, func(t *testing.T) { + t.Run(tc.Name, func(t *testing.T) { t.Parallel() - tc.setup(&tc) + tc.Setup(&tc) + }) + } +} +endsnippet +snippet htest "setup hellotech test case" ! +func Test${1}(t *testing.T) { + type testcase struct { + Name string + Setup func(tc *testcase) + } + tt := []testcase{} + for _, tc := range tt { + tc := tc + t.Run(tc.Name, func(t *testing.T) { + ctx, a, ctrl := cutils.Test(t) + t.Parallel() + tc.Setup(&tc) }) } }