package main
import (
"github.com/cheivin/di"
)
type (
Dao struct {
}
AService struct {
dao *Dao `aware:"dao"`
name string `value:"name"`
}
)
func main() {
di.Provide(Dao{}).
Provide(AService{}).
SetProperty("name", "name").
UnsafeMode(true). // 不安全模式
Load()
}