@@ -23,8 +23,8 @@ import (
2323 "github.com/urfave/cli/v3"
2424)
2525
26- // targetInfo holds information about a build target
27- type targetInfo struct {
26+ // BuildTargetInfo holds information about a build target
27+ type BuildTargetInfo struct {
2828 name string
2929 status stainless.BuildTargetStatus
3030}
@@ -107,61 +107,61 @@ func processSingleTarget(target string) (string, string) {
107107 return targetName , targetPath
108108}
109109
110- // getTargetInfo extracts completed targets from a build response
111- func getTargetInfo (buildRes stainless.BuildObject ) []targetInfo {
112- targets := []targetInfo {}
110+ // getBuildTargetInfo extracts completed targets from a build response
111+ func getBuildTargetInfo (buildRes stainless.BuildObject ) []BuildTargetInfo {
112+ targets := []BuildTargetInfo {}
113113
114114 // Check each target and add it to the list if it's completed or in postgen
115115 if buildRes .Targets .JSON .Node .Valid () {
116- targets = append (targets , targetInfo {
116+ targets = append (targets , BuildTargetInfo {
117117 name : "node" ,
118118 status : buildRes .Targets .Node .Status ,
119119 })
120120 }
121121 if buildRes .Targets .JSON .Typescript .Valid () {
122- targets = append (targets , targetInfo {
122+ targets = append (targets , BuildTargetInfo {
123123 name : "typescript" ,
124124 status : buildRes .Targets .Typescript .Status ,
125125 })
126126 }
127127 if buildRes .Targets .JSON .Python .Valid () {
128- targets = append (targets , targetInfo {
128+ targets = append (targets , BuildTargetInfo {
129129 name : "python" ,
130130 status : buildRes .Targets .Python .Status ,
131131 })
132132 }
133133 if buildRes .Targets .JSON .Go .Valid () {
134- targets = append (targets , targetInfo {
134+ targets = append (targets , BuildTargetInfo {
135135 name : "go" ,
136136 status : buildRes .Targets .Go .Status ,
137137 })
138138 }
139139 if buildRes .Targets .JSON .Cli .Valid () {
140- targets = append (targets , targetInfo {
140+ targets = append (targets , BuildTargetInfo {
141141 name : "cli" ,
142142 status : buildRes .Targets .Cli .Status ,
143143 })
144144 }
145145 if buildRes .Targets .JSON .Kotlin .Valid () {
146- targets = append (targets , targetInfo {
146+ targets = append (targets , BuildTargetInfo {
147147 name : "kotlin" ,
148148 status : buildRes .Targets .Kotlin .Status ,
149149 })
150150 }
151151 if buildRes .Targets .JSON .Java .Valid () {
152- targets = append (targets , targetInfo {
152+ targets = append (targets , BuildTargetInfo {
153153 name : "java" ,
154154 status : buildRes .Targets .Java .Status ,
155155 })
156156 }
157157 if buildRes .Targets .JSON .Ruby .Valid () {
158- targets = append (targets , targetInfo {
158+ targets = append (targets , BuildTargetInfo {
159159 name : "ruby" ,
160160 status : buildRes .Targets .Ruby .Status ,
161161 })
162162 }
163163 if buildRes .Targets .JSON .Terraform .Valid () {
164- targets = append (targets , targetInfo {
164+ targets = append (targets , BuildTargetInfo {
165165 name : "terraform" ,
166166 status : buildRes .Targets .Terraform .Status ,
167167 })
@@ -191,7 +191,7 @@ func waitForBuildCompletion(ctx context.Context, client stainless.Client, buildI
191191 return nil , fmt .Errorf ("build polling failed: %v" , err )
192192 }
193193
194- targets := getTargetInfo (* buildRes )
194+ targets := getBuildTargetInfo (* buildRes )
195195 allCompleted := true
196196
197197 for _ , target := range targets {
@@ -505,7 +505,7 @@ func handleBuildsRetrieve(ctx context.Context, cmd *cli.Command) error {
505505// pullBuildOutputs pulls the outputs for a completed build
506506func pullBuildOutputs (ctx context.Context , client stainless.Client , res stainless.BuildObject , targetPaths map [string ]string , pullGroup * Group ) error {
507507 // Get all targets
508- allTargets := getTargetInfo (res )
508+ allTargets := getBuildTargetInfo (res )
509509
510510 // Filter to only completed targets
511511 var targets []string
0 commit comments