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

Method parseMethod

mvc/controller.go:414–425  ·  view source on GitHub ↗
(m reflect.Method)

Source from the content-addressed store, hash-verified

412}
413
414func (c *ControllerActivator) parseMethod(m reflect.Method) {
415 httpMethod, httpPath, err := parseMethod(c.app.Router.Macros(), m, c.isReservedMethod, c.app.customPathWordFunc)
416 if err != nil {
417 if err != errSkip {
418 c.logErrorf("MVC: fail to parse the route path and HTTP method for '%s.%s': %v", c.fullName, m.Name, err)
419 }
420
421 return
422 }
423
424 c.Handle(httpMethod, httpPath, m.Name)
425}
426
427func (c *ControllerActivator) logErrorf(format string, args ...interface{}) {
428 c.Router().Logger().Errorf(format, args...)

Callers 1

parseMethodsMethod · 0.95

Calls 4

logErrorfMethod · 0.95
HandleMethod · 0.95
parseMethodFunction · 0.85
MacrosMethod · 0.65

Tested by

no test coverage detected