MCPcopy
hub / github.com/gotify/server / HasSupport

Function HasSupport

plugin/compat/instance.go:52–59  ·  view source on GitHub ↗

HasSupport tests a PluginInstance for a capability.

(p PluginInstance, toCheck Capability)

Source from the content-addressed store, hash-verified

50
51// HasSupport tests a PluginInstance for a capability.
52func 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.
62type Capabilities []Capability

Callers 4

createPluginConfMethod · 0.92
supportOrAbortFunction · 0.92
TestGetCapabilitiesMethod · 0.85

Calls 1

SupportsMethod · 0.65

Tested by 1

TestGetCapabilitiesMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…