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

Method Handle

example/middleware/main.go:110–115  ·  view source on GitHub ↗
(ctx dotweb.Context)

Source from the content-addressed store, hash-verified

108}
109
110func (m *AccessFmtLog) Handle(ctx dotweb.Context) error {
111 fmt.Println(time.Now(), "[AccessFmtLog ", m.Index, "] begin request -> ", ctx.Request().RequestURI)
112 err := m.Next(ctx)
113 fmt.Println(time.Now(), "[AccessFmtLog ", m.Index, "] finish request ", err, " -> ", ctx.Request().RequestURI)
114 return err
115}
116
117func NewAccessFmtLog(index string) *AccessFmtLog {
118 return &AccessFmtLog{Index: index}

Callers

nothing calls this directly

Calls 2

RequestMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected