mirror of
https://github.com/securego/gosec.git
synced 2024-12-26 04:25:52 +00:00
MatcMatchCompLit should be MatchCompList
This commit is contained in:
parent
0bce1770b5
commit
d05a2416a2
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue