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

Function Index

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

Source from the content-addressed store, hash-verified

45}
46
47func Index(ctx dotweb.Context) error {
48 ctx.Response().Header().Set("Content-Type", "text/html; charset=utf-8")
49 //fmt.Println(time.Now(), "Index Handler")
50 err := ctx.WriteString("index => ", ctx.Request().Url())
51 fmt.Println(ctx.RouterNode().GroupMiddlewares())
52 return err
53}
54
55func ShowMiddlewares(ctx dotweb.Context) error {
56 err := ctx.WriteString("ShowMiddlewares => ", ctx.RouterNode().GroupMiddlewares())

Callers

nothing calls this directly

Calls 8

UrlMethod · 0.80
SetMethod · 0.65
ResponseMethod · 0.65
WriteStringMethod · 0.65
RequestMethod · 0.65
GroupMiddlewaresMethod · 0.65
RouterNodeMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected