MCPcopy Create free account
hub / github.com/caddyserver/caddy / GetModule

Function GetModule

modules.go:164–172  ·  view source on GitHub ↗

GetModule returns module information from its ID (full name).

(name string)

Source from the content-addressed store, hash-verified

162
163// GetModule returns module information from its ID (full name).
164func GetModule(name string) (ModuleInfo, error) {
165 modulesMu.RLock()
166 defer modulesMu.RUnlock()
167 m, ok := modules[name]
168 if !ok {
169 return ModuleInfo{}, fmt.Errorf("module not registered: %s", name)
170 }
171 return m, nil
172}
173
174// GetModuleName returns a module's name (the last label of its ID)
175// from an instance of its value. If the value is not a module, an

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…