Skip to content

Commit 6659d05

Browse files
remove unused validation
1 parent 0491eb8 commit 6659d05

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

internal/validators/stream_validators.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -114,35 +114,6 @@ func (v Int64RangeValidator) ValidateInt64(ctx context.Context, req validator.In
114114
}
115115
}
116116

117-
type Float64RangeValidator struct {
118-
min float64
119-
max float64
120-
}
121-
122-
func (v Float64RangeValidator) Description(ctx context.Context) string {
123-
return fmt.Sprintf("value must be between %f and %f", v.min, v.max)
124-
}
125-
126-
func (v Float64RangeValidator) MarkdownDescription(ctx context.Context) string {
127-
return fmt.Sprintf("value must be between %f and %f", v.min, v.max)
128-
}
129-
130-
func (v Float64RangeValidator) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response) {
131-
if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {
132-
return
133-
}
134-
135-
value := req.ConfigValue.ValueFloat64()
136-
137-
if value < v.min || value > v.max {
138-
resp.Diagnostics.AddAttributeError(
139-
req.Path,
140-
"Invalid value",
141-
fmt.Sprintf("Expected value to be between %f and %f, got: %f", v.min, v.max, value),
142-
)
143-
}
144-
}
145-
146117
var (
147118
NetworkValidator = StringOneOfValidator{
148119
values: []string{

0 commit comments

Comments
 (0)