di-go/injection/annotation/inject.go

22 lines
354 B
Go
Raw Normal View History

2018-04-03 09:02:31 +00:00
package annotation
// @Inject(name? string)
import (
"reflect"
cda "git.loafle.net/commons/di-go/annotation"
)
2018-04-06 16:57:25 +00:00
var InjectAnnotationType = reflect.TypeOf((*InjectAnnotation)(nil))
2018-04-03 09:02:31 +00:00
func init() {
2018-04-06 16:57:25 +00:00
cda.RegisterAnnotation(InjectAnnotationType)
2018-04-03 09:02:31 +00:00
}
2018-04-06 16:57:25 +00:00
type InjectAnnotation struct {
cda.TypeAnnotation `@annotation:"@Inject"`
2019-11-11 13:52:10 +00:00
Name string `json:"name"`
2018-04-03 09:02:31 +00:00
}