di-go/injection/annotation/inject.go

21 lines
374 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"`
Name string `@annotation:"name"`
2018-04-03 09:02:31 +00:00
}