Skip to content

Commit 798f7d9

Browse files
committed
fix func descriptions
1 parent 3738ba9 commit 798f7d9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/validators/metadata_validator_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ type Target struct {
123123
IsBlueprint bool // true if came from blueprint vars, false if module.settings
124124
}
125125

126-
// parseIntInputRefactor parses an integer from the input map and returns a pointer.
126+
// parseIntInput parses an integer from the input map and returns a pointer.
127127
// It returns nil if the key is not found.
128128
func parseIntInput(inputs map[string]interface{}, key string) (*int, error) {
129129
v, ok := inputs[key]

pkg/validators/metadata_validators.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ func (v *AllowedEnumValidator) Validate(
193193
})
194194
}
195195

196-
// RangeValidator implements the Validator interface for 'range' type.
196+
// RangeValidator implements the RuleValidator interface for the 'range' validation type.
197197
type RangeValidator struct{}
198198

199-
// checkBounds validates a single integer value against the provided min and max bounds.
199+
// checkBounds validates a single integer value against the optional minimum and maximum bounds.
200200
func (r *RangeValidator) checkBounds(value int, min *int, max *int, customErrMsg string, path config.Path) error {
201201
if min != nil && value < *min {
202202
msg := customErrMsg
@@ -215,7 +215,7 @@ func (r *RangeValidator) checkBounds(value int, min *int, max *int, customErrMsg
215215
return nil
216216
}
217217

218-
// validateTarget applies range validation to a given cty.Value.
218+
// validateTarget applies range validation to a list of cty.Values.
219219
func (r *RangeValidator) validateTarget(
220220
values []cty.Value,
221221
path config.Path,
@@ -253,7 +253,7 @@ func (r *RangeValidator) validateTarget(
253253
return nil
254254
}
255255

256-
// Validate checks if the variables specified in the rule match the provided range pattern.
256+
// Validate checks if the variables specified in the rule fall within the specified numeric range or length constraints.
257257
func (r *RangeValidator) Validate(
258258
bp config.Blueprint,
259259
mod config.Module,

0 commit comments

Comments
 (0)