Skip to content

Commit 979810f

Browse files
committed
add handle for possible nil pointer
1 parent bb135bc commit 979810f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/cmd/volume/backup/create/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ func outputResult(p *print.Printer, outputFormat string, async bool, sourceLabel
225225

226226
default:
227227
if async {
228-
p.Outputf("Triggered backup of %s in %s. Backup ID: %s\n", sourceLabel, projectLabel, *resp.Id)
228+
p.Outputf("Triggered backup of %s in %s. Backup ID: %s\n", sourceLabel, projectLabel, utils.PtrString(resp.Id))
229229
} else {
230-
p.Outputf("Created backup of %s in %s. Backup ID: %s\n", sourceLabel, projectLabel, *resp.Id)
230+
p.Outputf("Created backup of %s in %s. Backup ID: %s\n", sourceLabel, projectLabel, utils.PtrString(resp.Id))
231231
}
232232
return nil
233233
}

0 commit comments

Comments
 (0)