Skip to content

Commit 905a60c

Browse files
committed
style: break long lines in DBTX interface methods
Split long poet.Method declarations across multiple lines for better readability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2eb3639 commit 905a60c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

internal/codegen/golang/generator.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,21 @@ func (g *CodeGenerator) addDBCodeStd(f *poet.File) {
349349
func (g *CodeGenerator) addDBCodePGX(f *poet.File) {
350350
// DBTX interface
351351
methods := []poet.Method{
352-
{Name: "Exec", Params: []poet.Param{{Name: "", Type: "context.Context"}, {Name: "", Type: "string"}, {Name: "", Type: "...interface{}"}}, Results: []poet.Param{{Type: "pgconn.CommandTag"}, {Type: "error"}}},
353-
{Name: "Query", Params: []poet.Param{{Name: "", Type: "context.Context"}, {Name: "", Type: "string"}, {Name: "", Type: "...interface{}"}}, Results: []poet.Param{{Type: "pgx.Rows"}, {Type: "error"}}},
354-
{Name: "QueryRow", Params: []poet.Param{{Name: "", Type: "context.Context"}, {Name: "", Type: "string"}, {Name: "", Type: "...interface{}"}}, Results: []poet.Param{{Type: "pgx.Row"}}},
352+
{
353+
Name: "Exec",
354+
Params: []poet.Param{{Type: "context.Context"}, {Type: "string"}, {Type: "...interface{}"}},
355+
Results: []poet.Param{{Type: "pgconn.CommandTag"}, {Type: "error"}},
356+
},
357+
{
358+
Name: "Query",
359+
Params: []poet.Param{{Type: "context.Context"}, {Type: "string"}, {Type: "...interface{}"}},
360+
Results: []poet.Param{{Type: "pgx.Rows"}, {Type: "error"}},
361+
},
362+
{
363+
Name: "QueryRow",
364+
Params: []poet.Param{{Type: "context.Context"}, {Type: "string"}, {Type: "...interface{}"}},
365+
Results: []poet.Param{{Type: "pgx.Row"}},
366+
},
355367
}
356368
if g.tctx.UsesCopyFrom {
357369
methods = append(methods, poet.Method{

0 commit comments

Comments
 (0)