di-go/annotation/inject.go

21 lines
349 B
Go
Raw Normal View History

2018-08-23 08:06:25 +00:00
package annotation
// @Inject(name? string)
import (
"reflect"
oa "git.loafle.net/overflow/annotation-go"
)
func init() {
oa.Register(InjectAnnotationType)
}
var InjectAnnotationType = reflect.TypeOf((*InjectAnnotation)(nil))
type InjectAnnotation struct {
oa.Annotation `@name:"@Inject"`
Name string `json:"name" @default:""`
}