Skip to content

Commit aaa30cb

Browse files
Use slice element pointer in NABSL prompt loop
1 parent 9592206 commit aaa30cb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/non-admin/backup/create.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,9 @@ func promptForNABSLSelection(items []nacv1alpha1.NonAdminBackupStorageLocation,
344344
}
345345

346346
fmt.Fprintln(out, "Multiple non-admin backup storage locations found. Select one:")
347-
for i, nabsl := range items {
348-
fmt.Fprintf(out, " %d) %s (%s)\n", i+1, nabsl.Name, formatNABSLPhase(&nabsl))
347+
for i := range items {
348+
nabsl := &items[i]
349+
fmt.Fprintf(out, " %d) %s (%s)\n", i+1, nabsl.Name, formatNABSLPhase(nabsl))
349350
}
350351

351352
reader := bufio.NewReader(in)

0 commit comments

Comments
 (0)