HasSupport tests a PluginInstance for a capability.
(p PluginInstance, toCheck Capability)
| 50 | |
| 51 | // HasSupport tests a PluginInstance for a capability. |
| 52 | func HasSupport(p PluginInstance, toCheck Capability) bool { |
| 53 | for _, module := range p.Supports() { |
| 54 | if module == toCheck { |
| 55 | return true |
| 56 | } |
| 57 | } |
| 58 | return false |
| 59 | } |
| 60 | |
| 61 | // Capabilities is a slice of module. |
| 62 | type Capabilities []Capability |
searching dependent graphs…