package budget2 import "github.com/gin-gonic/gin" const ( PkgType int = iota SpaceType ItemType ) type Current struct { Type int SpaceId int SpaceIndex int ItemIndex int Instance *Instance } type Context struct { Order *Order C *gin.Context Current Current Cache map[string]interface{} } func (context *Context) CurrentInstance() *Instance { return context.Current.Instance }