MCPcopy Create free account
hub / github.com/kataras/iris / CopyHandlers

Function CopyHandlers

context/handler.go:392–403  ·  view source on GitHub ↗

CopyHandlers returns a copy of "handlers" Handlers slice.

(handlers Handlers)

Source from the content-addressed store, hash-verified

390
391// CopyHandlers returns a copy of "handlers" Handlers slice.
392func CopyHandlers(handlers Handlers) Handlers {
393 handlersCp := make(Handlers, 0, len(handlers))
394 for _, handler := range handlers {
395 if handler == nil {
396 continue
397 }
398
399 handlersCp = append(handlersCp, handler)
400 }
401
402 return handlersCp
403}
404
405// HandlerExists reports whether a handler exists in the "handlers" slice.
406func HandlerExists(handlers Handlers, handlerNameOrFunc any) bool {

Callers 1

createRoutesMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…