示例#1
0
文件: params.go 项目: snikch/api
// ContextParams returns the httprouter.Params for the context.
func ContextParams(context *ctx.Context) httprouter.Params {
	return context.Get(paramsContextKey).(httprouter.Params)
}
示例#2
0
文件: criteria.go 项目: snikch/api
// ContextCriteria returns the criteria for the supplied context.
func ContextCriteria(context *ctx.Context) *Criteria {
	return context.Get(criteriaContextKey).(*Criteria)
}