dependency question
Open
🤔 type:question
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
when i use RegisterDependency to implements singleton bean
```
func main(){
IrisApp = iris.New()
IrisApp.RegisterDependency(NewService)
party:=IrisApp.Party("/test")
irisMvc := mvc.New(party)
irisMvc.handle(new(controller))
}
func NewService(){
return &Test{name:"kangkang"}
}
type Test struct{
name string
}
type controller struct{
test Test
}
func (c *controller)Get(){
fmt.Println(&c.test)
}
```
myquestion is that does the c.test is singleton? not new every time
Contributor guide
Assessment
This issue has not been assessed yet.