Skip to content

Commit 44498a1

Browse files
committed
address pr comments
1 parent 62c9b06 commit 44498a1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

helper/validation/network.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func SingleIP() schema.SchemaValidateFunc {
1717
return IsIPAddress
1818
}
1919

20-
// SingleIP returns a SchemaValidateFunc which tests if the provided value is of type string and is a single IP (v4 or v6)
20+
// IsIPAddress returns a SchemaValidateFunc which tests if the provided value is of type string and is a single IP (v4 or v6)
2121
func IsIPAddress(i interface{}, k string) (warnings []string, errors []error) {
2222
v, ok := i.(string)
2323
if !ok {
@@ -72,7 +72,7 @@ func IPRange() schema.SchemaValidateFunc {
7272
return IsIPv4Range
7373
}
7474

75-
// IPRange returns a SchemaValidateFunc which tests if the provided value is of type string, and in valid IP range
75+
// IsIPv4Range returns a SchemaValidateFunc which tests if the provided value is of type string, and in valid IP range
7676
func IsIPv4Range(i interface{}, k string) (warnings []string, errors []error) {
7777
v, ok := i.(string)
7878
if !ok {
@@ -118,7 +118,7 @@ func CIDRNetwork(min, max int) schema.SchemaValidateFunc {
118118
return IsCIDRNetwork(min, max)
119119
}
120120

121-
// CIDRNetwork returns a SchemaValidateFunc which tests if the provided value
121+
// IsCIDRNetwork returns a SchemaValidateFunc which tests if the provided value
122122
// is of type string, is in valid Value network notation, and has significant bits between min and max (inclusive)
123123
func IsCIDRNetwork(min, max int) schema.SchemaValidateFunc {
124124
return func(i interface{}, k string) (warnings []string, errors []error) {

helper/validation/strings.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,13 @@ func StringIsJSON(i interface{}, k string) (warnings []string, errors []error) {
209209

210210
// ValidateRegexp returns a SchemaValidateFunc which tests to make sure the
211211
// supplied string is a valid regular expression.
212+
//
213+
// Deprecated: use StringIsValidRegExp instead
212214
func ValidateRegexp(i interface{}, k string) (warnings []string, errors []error) {
213215
return StringIsValidRegExp(i, k)
214216
}
215217

216-
// ValidateRegexp returns a SchemaValidateFunc which tests to make sure the supplied string is a valid regular expression.
218+
// StringIsValidRegExp returns a SchemaValidateFunc which tests to make sure the supplied string is a valid regular expression.
217219
func StringIsValidRegExp(i interface{}, k string) (warnings []string, errors []error) {
218220
v, ok := i.(string)
219221
if !ok {

0 commit comments

Comments
 (0)