File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package types
33import (
44 "fmt"
55
6+ gogen "github.com/buildkite/buildkite-sdk/internal/gen/go"
67 "github.com/buildkite/buildkite-sdk/internal/gen/typescript"
78 "github.com/buildkite/buildkite-sdk/internal/gen/utils"
89)
@@ -26,13 +27,12 @@ func (Number) IsPrimitive() bool {
2627
2728// Go
2829func (n Number ) Go () (string , error ) {
29- block := utils .NewCodeBlock ()
30- if n .Description != "" {
31- block .AddLines (fmt .Sprintf ("// %s" , n .Description ))
32- }
33-
34- block .AddLines (fmt .Sprintf ("type %s = int" , n .Name .ToTitleCase ()))
35- return block .String (), nil
30+ typ := gogen .NewType (
31+ n .Name .ToTitleCase (),
32+ n .Description ,
33+ "int" ,
34+ )
35+ return typ .String (), nil
3636}
3737
3838func (Number ) GoStructType () string {
You can’t perform that action at this time.
0 commit comments