MCPcopy Create free account
hub / github.com/devfeel/dotweb / UsePlugin

Method UsePlugin

dotweb.go:241–247  ·  view source on GitHub ↗

UsePlugin registers plugins

(plugins ...Plugin)

Source from the content-addressed store, hash-verified

239
240// UsePlugin registers plugins
241func (app *DotWeb) UsePlugin(plugins ...Plugin) {
242 app.pluginMutex.Lock()
243 defer app.pluginMutex.Unlock()
244 for _, p := range plugins {
245 app.pluginMap[p.Name()] = p
246 }
247}
248
249// Use registers middlewares
250func (app *DotWeb) Use(m ...Middleware) {

Callers

nothing calls this directly

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected