@@ -15,7 +15,6 @@ import (
1515 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
1616 "github.com/stackitcloud/stackit-cli/internal/pkg/services/git/client"
1717 "github.com/stackitcloud/stackit-cli/internal/pkg/spinner"
18- "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1918 "github.com/stackitcloud/stackit-sdk-go/services/git"
2019 "github.com/stackitcloud/stackit-sdk-go/services/git/wait"
2120)
@@ -93,7 +92,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
9392 s .Stop ()
9493 }
9594
96- return outputResult (params .Printer , model .OutputFormat , model .Async , model .Name , model .Id , result )
95+ return outputResult (params .Printer , model .OutputFormat , model .Async , model .Name , * model .Id , result )
9796 },
9897 }
9998
@@ -143,21 +142,17 @@ func createPayload(model *inputModel) git.CreateInstancePayload {
143142 }
144143}
145144
146- func outputResult (p * print.Printer , outputFormat string , async bool , instanceName string , modelId * string , resp * git.Instance ) error {
145+ func outputResult (p * print.Printer , outputFormat string , async bool , instanceName , modelId string , resp * git.Instance ) error {
147146 if resp == nil {
148147 return fmt .Errorf ("API resp is nil" )
149148 }
150- id := utils .PtrString (modelId )
151- if resp .Id != nil {
152- id = * resp .Id
153- }
154149
155150 return p .OutputResult (outputFormat , resp , func () error {
156151 operationState := "Created"
157152 if async {
158153 operationState = "Triggered creation of"
159154 }
160- p .Outputf ("%s instance %q with id %s\n " , operationState , instanceName , id )
155+ p .Outputf ("%s instance %q with id %s\n " , operationState , instanceName , modelId )
161156 return nil
162157 })
163158}
0 commit comments