di-go/annotation/inject.go
crusader 93072d1a5e ing
2018-09-04 15:12:06 +09:00

22 lines
405 B
Go

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:""`
Required bool `json:"required" @default:"true"`
}