Skip to content

Commit 9a46070

Browse files
committed
minor nit
Signed-off-by: Tullio Sebastiani <[email protected]>
1 parent 171ea3d commit 9a46070

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/forms/forms.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
// FormPromptItem represents a single form input item with optional predefined value
1717
type FormPromptItem struct {
18-
Field *typing.InputField
18+
Field *typing.InputField
1919
PredefinedValue *string
2020
}
2121

@@ -30,7 +30,7 @@ type FormResult struct {
3030
type Form struct {
3131
RequiredItems []FormPromptItem
3232
OptionalItems []FormPromptItem
33-
GlobalItems []FormPromptItem // Global values array
33+
GlobalItems []FormPromptItem // Global values array
3434
}
3535

3636
// NewForm creates a new form from a slice of InputFields and optional predefined values
@@ -48,9 +48,9 @@ func NewForm(fields []typing.InputField, predefinedValues map[string]*string) *F
4848
predefinedValue = val
4949
}
5050
}
51-
51+
fieldCopy := field
5252
item := FormPromptItem{
53-
Field: &field,
53+
Field: &fieldCopy,
5454
PredefinedValue: predefinedValue,
5555
}
5656

@@ -270,4 +270,4 @@ func (r *FormResult) GetEnvironmentVariables() map[string]string {
270270
}
271271
}
272272
return env
273-
}
273+
}

0 commit comments

Comments
 (0)