Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct { PkgPath string Package *packages.Package Type *types.Named Struct *types.Struct Methods []Method Children []*BuilderRef MethodNames map[string]*Method File *ast.File FilePath string Rendered bool GeneratedMethods []Method }
Builder represents a struct type that is considered to be a builder. Builder has at least one method that returns altered Builder copy (chaining method). Every non-chaining method is considered as finalizer
func (*Builder) HasChainingMethods ¶
func (*Builder) ReceiverName ¶
func (*Builder) Ref ¶
func (b *Builder) Ref(builder *Builder) *BuilderRef
func (*Builder) RenderChainMethod ¶
func (*Builder) RenderFinalizer ¶
type BuilderRef ¶
type Chaingen ¶
type Chaingen struct {
// contains filtered or unexported fields
}
func (Chaingen) NewBuilder ¶
type File ¶
type Method ¶
type Method struct { Name string Alias string Scope *types.Scope Pos token.Pos Variadic bool Exported bool Builder *Builder BuilderField string Recv MethodParam Params []MethodParam Results []MethodParam FinalizerName string }
func (Method) Doc ¶
func (m Method) Doc() *ast.CommentGroup
func (Method) IsChaining ¶
func (Method) IsFinalizer ¶
type MethodParam ¶
Click to show internal directories.
Click to hide internal directories.