helper/validation: Fix comment on StringMatch

To match the current implementation.
This commit is contained in:
Chris Marchesi 2017-12-01 10:48:25 -08:00
parent e33aa9dc2e
commit 5da62a44f4
No known key found for this signature in database
GPG Key ID: 8D6F1589D9834498
1 changed files with 2 additions and 3 deletions

View File

@ -107,9 +107,8 @@ func StringLenBetween(min, max int) schema.SchemaValidateFunc {
}
// StringMatch returns a SchemaValidateFunc which tests if the provided value
// matches a given regexp, which must compile or else the function will panic.
// Optionally an error message can be provided to return something friendlier
// than "must match some globby regexp".
// matches a given regexp. Optionally an error message can be provided to
// return something friendlier than "must match some globby regexp".
func StringMatch(r *regexp.Regexp, message string) schema.SchemaValidateFunc {
return func(i interface{}, k string) ([]string, []error) {
v, ok := i.(string)