24 lines
293 B
Go
24 lines
293 B
Go
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)
|
|
}
|
|
|