MatcMatchCompLit should be MatchCompList

This commit is contained in:
Grant Murphy 2016-08-28 11:44:14 -07:00
parent 0bce1770b5
commit d05a2416a2

View file

@ -46,7 +46,7 @@ func MatchCall(n ast.Node, r *regexp.Regexp) *ast.CallExpr {
return nil return nil
} }
// MatcMatchCompLit will match an ast.CompositeLit if its string value obays the given regex. // MatchCompLit will match an ast.CompositeLit if its string value obays the given regex.
func MatchCompLit(n ast.Node, r *regexp.Regexp) *ast.CompositeLit { func MatchCompLit(n ast.Node, r *regexp.Regexp) *ast.CompositeLit {
t := reflect.TypeOf(&ast.CompositeLit{}) t := reflect.TypeOf(&ast.CompositeLit{})
if name, ok := selectName(n, t); ok && r.MatchString(name) { if name, ok := selectName(n, t); ok && r.MatchString(name) {