// NewScope create new instance of scope func NewScope(tagname string) app.Scope { ds := &DataScope{ Data: make(map[string]interface{}), } return &Scope{ EventScope: NewEventScope(), DataScope: app.DataScope(ds), Injector: ds.Injector(tagname), } }
// NewDataScope create new instance of data scope func NewDataScope(data map[string]interface{}) app.DataScope { return app.DataScope(&DataScope{ Data: make(map[string]interface{}), }) }