rwiki/server/context.go

25 lines
293 B
Go
Raw Normal View History

2024-03-01 00:23:26 +03:00
package server
import (
"vultras.su/core/bond"
)
type ContextData struct {
*Server
}
type Context struct {
*bond.Context
ContextData
}
type Func func(c *Context)
func (f Func) Handle(c *bond.Context) {
ctx := &Context{
Context: c,
ContextData: c.Data.(ContextData),
}
f(ctx)
}