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

Function getByID

_examples/database/sqlx/main.go:174–186  ·  view source on GitHub ↗
(db *sql.DB)

Source from the content-addressed store, hash-verified

172}
173
174func getByID(db *sql.DB) iris.Handler {
175 return func(ctx iris.Context) {
176 eventID := ctx.Params().Get("event_id")
177
178 evt, err := getEvent(ctx, db, eventID)
179 if err != nil {
180 errors.Internal.LogErr(ctx, err)
181 return
182 }
183
184 ctx.JSON(evt)
185 }
186}

Callers 1

mainFunction · 0.85

Calls 5

getEventFunction · 0.85
ParamsMethod · 0.80
LogErrMethod · 0.80
GetMethod · 0.65
JSONMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…