Skip to content

Commit a94d4c3

Browse files
committed
remove isvariablevalid function
1 parent ebd0938 commit a94d4c3

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

pkg/config/draftconfig.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,6 @@ func (d *DraftConfig) GetVariableValue(name string) (any, error) {
124124
return "", fmt.Errorf("variable %s not found", name)
125125
}
126126

127-
func (d *DraftConfig) IsVariableValid(name string) bool {
128-
for _, variable := range d.Variables {
129-
if variable.Name == name {
130-
if variable.Value == "" {
131-
return false
132-
}
133-
134-
if err := d.GetVariableValidator(variable.Kind)(variable.Value); err != nil {
135-
return false
136-
}
137-
138-
return true
139-
}
140-
}
141-
142-
return false
143-
}
144-
145127
func (d *DraftConfig) SetVariable(name, value string) {
146128
if variable, err := d.GetVariable(name); err != nil {
147129
d.Variables = append(d.Variables, &BuilderVar{

0 commit comments

Comments
 (0)