From 5da62a44f403614814fb415166e1a2f8c0053649 Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Fri, 1 Dec 2017 10:48:25 -0800 Subject: [PATCH] helper/validation: Fix comment on StringMatch To match the current implementation. --- helper/validation/validation.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/helper/validation/validation.go b/helper/validation/validation.go index 65a453026f..b929163157 100644 --- a/helper/validation/validation.go +++ b/helper/validation/validation.go @@ -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)