Documentation ¶
Overview ¶
Package gen for generate golang code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Annotation ¶
Annotation conatiner with name and body annotation.
func ParseAnnotations ¶
func ParseAnnotations(in string) []Annotation
ParseAnnotations return annotation from text.
Annotation format @<annotation_name(<annotation_body>).
type GeneratorRule ¶
type GeneratorRule struct { AnnotaionName string Cfg collections.GeneratorConfig CfgRaw string G collections.Generator }
func NewGeneratorRule ¶
func NewGeneratorRule(a Annotation) *GeneratorRule
func (*GeneratorRule) Gen ¶
func (r *GeneratorRule) Gen(w io.Writer, cfg collections.GeneratorConfig, node parse.Node) error
func (*GeneratorRule) IsValid ¶
func (r *GeneratorRule) IsValid() bool
func (*GeneratorRule) Match ¶
func (r *GeneratorRule) Match(node parse.Node) bool
func (r *GeneratorRule) Match(t token.Token, spec ast.Spec) bool {
func (*GeneratorRule) Name ¶
func (r *GeneratorRule) Name() string
Click to show internal directories.
Click to hide internal directories.