package server import ( cuc "git.loafle.net/commons/util-go/context" ) type ServletCtx interface { cuc.Context ServerCtx() ServerCtx } func NewServletContext(parent cuc.Context, serverCtx ServerCtx) ServletCtx { return &servletCtx{ Context: cuc.NewContext(parent), serverCtx: serverCtx, } } type servletCtx struct { cuc.Context serverCtx ServerCtx } func (sc *servletCtx) ServerCtx() ServerCtx { return sc.serverCtx }