Skip to content

Commit

Permalink
Prevent partial matches on controllers
Browse files Browse the repository at this point in the history
Module was allowing for partial matches on controllers, this fixes it
closes #1200
  • Loading branch information
notzippy committed Jul 14, 2017
1 parent 1ebb4a5 commit 6c8d554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module.go
Expand Up @@ -44,7 +44,7 @@ func (m *Module) ControllerByName(name, action string) (ctype *ControllerType) {
comparision = m.Namespace() + name
}
for _, c := range m.ControllerTypeList {
if strings.Index(c.Name(), comparision) > -1 {
if c.Name() == comparision {
ctype = c
break
}
Expand Down

1 comment on commit 6c8d554

@mattbaird
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to @notzippy this guy went above and beyond. Thank you!

Please sign in to comment.