di-go/injection/annotation/inject.go
2019-11-11 22:52:10 +09:00

22 lines
354 B
Go

package annotation
// @Inject(name? string)
import (
"reflect"
cda "git.loafle.net/commons/di-go/annotation"
)
var InjectAnnotationType = reflect.TypeOf((*InjectAnnotation)(nil))
func init() {
cda.RegisterAnnotation(InjectAnnotationType)
}
type InjectAnnotation struct {
cda.TypeAnnotation `@annotation:"@Inject"`
Name string `json:"name"`
}