Skip to content

Commit 6dd08b1

Browse files
committed
Generator: handle long type for parameters (#317)
1 parent e7244ba commit 6dd08b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/build/cmd/generate/commands/gensource/generator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,9 @@ func (r ` + g.Endpoint.MethodWithNamespace() + `Request) Do(ctx context.Context,
604604
case "list":
605605
pathGrow.WriteString(`len(strings.Join(r.` + p + `, ",")) + `)
606606
pathContent.WriteString(` path.WriteString(strings.Join(r.` + p + `, ","))` + "\n")
607+
case "long":
608+
pathGrow.WriteString(`len(strconv.Itoa(*r.` + p + `)) + `)
609+
pathContent.WriteString(` path.WriteString(strconv.Itoa(*r.` + p + `))` + "\n")
607610
default:
608611
panic(fmt.Sprintf("FAIL: %q: unexpected type %q for URL part %q\n", g.Endpoint.Name, a.Type, a.Name))
609612
}

0 commit comments

Comments
 (0)