Versions in this module Expand all Collapse all v0 v0.0.1 Apr 6, 2025 Changes in this version + func AppendLabels(labelstr string, labels []string) []string + func AsImpl(value ast.Expr, pkg *packages.Package) (*types.Named, bool) + func AsInterface(_type ast.Expr, pkg *packages.Package) (*types.Named, bool) + func CamelCase(text string) string + func Directives(comments ast.CommentMap, pkg *packages.Package) []string + func IocGen(typ types.Type) + func IsError(obj types.Type) bool + func IsErrorVar(v *types.Var) bool + func IsInterfaceKind(k TypeKind) bool + func IsStructPointerKind(k TypeKind) bool + func Load(path string) *packages.Package + func SearchDirectives(flagSet *flag.FlagSet, directives []string, patterns []string, name string, ...) string + func TypeName(typ types.Type) string + func TypePkg(typ types.Type) *types.Package + type Directive struct + func (d *Directive) Cmd() string + func (d *Directive) Parse(fn func(*flag.Flag)) error + type Func struct + func NewFunc(obj types.Object) (*Func, error) + func (f *Func) Exported() bool + func (f *Func) FullName() string + func (f *Func) Id() string + func (f *Func) IsValid() bool + func (f *Func) Kind() string + func (f *Func) Labels() string + func (f *Func) Name() string + func (f *Func) Param(i int) (*types.Var, error) + func (f *Func) ParamPvd(param string) string + func (f *Func) ParamType(i int) (types.Type, error) + func (f *Func) Params() *types.Tuple + func (f *Func) Parent() *types.Scope + func (f *Func) Pkg() *types.Package + func (f *Func) PvdName() string + func (f *Func) Recv() *types.Var + func (f *Func) RecvTypeParams() *types.TypeParamList + func (f *Func) Result(i int) (*types.Var, bool) + func (f *Func) ResultType(i int) (types.Type, bool) + func (f *Func) Results() *types.Tuple + func (f *Func) ReturnError() bool + func (f *Func) SetDirectives(directives []string) + func (f *Func) SignatureString() string + func (f *Func) String() string + func (f *Func) TypeParams() *types.TypeParamList + func (f *Func) Underlying() types.Type + func (f *Func) Variadic() bool + type ImplementStmt struct + func NewImplementStmt(spec *ast.ValueSpec, pkg *packages.Package) (*ImplementStmt, bool) + func NewImplementStmtSlice(fn *Func, pkg *packages.Package) ([]*ImplementStmt, bool) + func (s *ImplementStmt) IfaceName() string + func (s *ImplementStmt) IfacePkg() *types.Package + func (s *ImplementStmt) ImplName() string + func (s *ImplementStmt) ImplPkg() *types.Package + func (s *ImplementStmt) ImplType() types.Type + func (s *ImplementStmt) IsPointerImpl() bool + func (s *ImplementStmt) Labels() string + func (s *ImplementStmt) SetDirectives(directives []string) + func (s *ImplementStmt) String() string + type Interface struct + func NewInterface(obj types.Object) (*Interface, error) + func (t *Interface) Complete() *types.Interface + func (t *Interface) ComponentName() string + func (t *Interface) Directives() []string + func (t *Interface) EmbeddedType(i int) types.Type + func (t *Interface) Empty() bool + func (t *Interface) ExplicitMethod(i int) *types.Func + func (t *Interface) Exported() bool + func (t *Interface) IsComparable() bool + func (t *Interface) IsImplicit() bool + func (t *Interface) IsMethodSet() bool + func (t *Interface) Method(i int) *types.Func + func (t *Interface) Name() string + func (t *Interface) NumEmbeddeds() int + func (t *Interface) NumExplicitMethods() int + func (t *Interface) NumMethods() int + func (t *Interface) Parent() *types.Scope + func (t *Interface) Pkg() *types.Package + func (t *Interface) SetDirectives(directives []string) + func (t *Interface) String() string + func (t *Interface) Type() types.Type + func (t *Interface) Underlying() types.Type + type Labels struct + func (l *Labels) Append(labels string) *Labels + func (l *Labels) Labeled(label string) bool + type ObjectKind int + const KindFunc + const KindInterface + const KindOther + const KindStruct + const KindVar + func Kind(obj types.Object) ObjectKind + type Struct struct + func LoadStructs(pkg string) []*Struct + func NewStruct(obj types.Object) (*Struct, error) + func (s *Struct) Autowire() bool + func (s *Struct) ComponentName() string + func (s *Struct) Exported() bool + func (s *Struct) Field(i int) *types.Var + func (s *Struct) Fields() iter.Seq2[int, *Var] + func (s *Struct) IsComponent() bool + func (s *Struct) Method(i int) *types.Func + func (s *Struct) Name() string + func (s *Struct) NumFields() int + func (s *Struct) NumMethods() int + func (s *Struct) Origin() *types.Named + func (s *Struct) ParentScope() *types.Scope + func (s *Struct) Pkg() *types.Package + func (s *Struct) SetDirectives(directives []string) + func (s *Struct) String() string + func (s *Struct) Tag(i int) reflect.StructTag + func (s *Struct) Type() types.Type + func (s *Struct) TypeArgs() *types.TypeList + func (s *Struct) TypeParams() *types.TypeParamList + type TypeKind int + const TypeKindBasic + const TypeKindFunc + const TypeKindInterface + const TypeKindNestedPointer + const TypeKindOther + const TypeKindPointer + const TypeKindStruct + const TypeKindStructPointer + func TypeKindOf(typ types.Type) TypeKind + type Var struct + func NewVar(obj types.Object) (*Var, error) + func (v *Var) Directives() []string + func (v *Var) Name() string + func (v *Var) SetDirectives(directives []string) + func (v *Var) Type() types.Type + func (v *Var) TypeKind() TypeKind + func (v *Var) TypeName() string + func (v *Var) TypePkg() *types.Package