Skip to content

Commit b3d2c59

Browse files
committed
Return error on invalid settings
1 parent 8b5075b commit b3d2c59

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gen.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ func buildQueries(conf Config, req *plugin.CodeGenRequest, structs []Struct) ([]
409409
if conf.QueryParameterLimit != nil {
410410
qpl = int(*conf.QueryParameterLimit)
411411
}
412+
if qpl < 0 {
413+
return nil, errors.New("invalid query parameter limit")
414+
}
412415
if len(query.Params) > qpl || qpl == 0 {
413416
var cols []pyColumn
414417
for _, p := range query.Params {

0 commit comments

Comments
 (0)