Documentation
¶
Index ¶
- func DoesStructEmbedStruct(sourceFile *ast.File, structFullPackageName string, structNode *ast.StructType, ...) bool
- func DoesStructEmbedType(pkg *packages.Package, structName string, embeddedStructFullPackage string, ...) (bool, error)
- func DoesTypeOrInterfaceExistInPackage(packages []*packages.Package, packageFullName string, ident *ast.Ident) (bool, definitions.AstNodeKind, error)
- func FilterPackageByFullName(packages []*packages.Package, fullName string) *packages.Package
- func FindAndExtract(input []string, search string) string
- func FindAndExtractOccurrences(input []string, search string, maxMatchCount uint) []string
- func FindGenDeclByIdent(fileSet *token.FileSet, file *ast.File, ident *ast.Ident) *ast.GenDecl
- func FindGenDeclByName(pkg *packages.Package, typeSpecName string) *ast.GenDecl
- func FindTypesStructInPackage(pkg *packages.Package, structName string) (*types.Struct, error)
- func GetAllPackageFiles(codeFiles []*ast.File, fileSet *token.FileSet, fullPackageNameToFind string) ([]*ast.File, error)
- func GetCommentsFromIdent(files *token.FileSet, file *ast.File, ident *ast.Ident) []string
- func GetDefaultAlias(fullyQualifiedPackage string) string
- func GetDefaultPackageAlias(file *ast.File) (string, error)
- func GetDotImportedPackageNames(file *ast.File) []string
- func GetFieldMetadata(file *ast.File, fileSet *token.FileSet, packages []*packages.Package, ...) (definitions.TypeMetadata, error)
- func GetFieldTypeString(fieldType ast.Expr) string
- func GetFileByImportNode(codeFiles []*ast.File, fileSet *token.FileSet, importNode *ast.ImportSpec) (*ast.File, error)
- func GetFullPackageName(file *ast.File, fileSet *token.FileSet) (string, error)
- func GetFuncParameterTypeList(file *ast.File, fileSet *token.FileSet, packages []*packages.Package, ...) ([]definitions.ParamMeta, error)
- func GetFuncReturnTypeList(file *ast.File, fileSet *token.FileSet, packages []*packages.Package, ...) ([]definitions.TypeMetadata, error)
- func GetImportAliases(file *ast.File) map[string]string
- func GetNodeKind(fieldType ast.Expr) definitions.AstNodeKind
- func GetPackageAndDependencies(codeFiles []*ast.File, fileSet *token.FileSet, fullPackageNameToFind string, ...) error
- func GetPackagesFromExpressions(packageExpressions []string) ([]*packages.Package, error)
- func GetStructFromGenDecl(decl *ast.GenDecl) *ast.StructType
- func GetTypeMetaByIdent(file *ast.File, fileSet *token.FileSet, packages []*packages.Package, ...) (definitions.TypeMetadata, error)
- func GetTypeMetaBySelectorExpr(file *ast.File, fileSet *token.FileSet, packages []*packages.Package, ...) (definitions.TypeMetadata, error)
- func IsAliasDefault(fullPackageName string, alias string) bool
- func IsFuncDeclReceiverForStruct(structName string, funcDecl *ast.FuncDecl) bool
- func IsIdentInPackage(pkg *packages.Package, ident *ast.Ident) bool
- func IsPackageDotImported(file *ast.File, packageName string) (bool, string)
- func IsUniverseType(typeName string) bool
- func LookupTypeName(pkg *packages.Package, name string) (*types.TypeName, error)
- func MapDocListToStrings(docList []*ast.Comment) []string
- func TryGetStructOrInterfaceKind(pkg *packages.Package, name string) (definitions.AstNodeKind, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoesStructEmbedStruct ¶
func DoesStructEmbedType ¶
func DoesTypeOrInterfaceExistInPackage ¶
func DoesTypeOrInterfaceExistInPackage( packages []*packages.Package, packageFullName string, ident *ast.Ident, ) (bool, definitions.AstNodeKind, error)
func FilterPackageByFullName ¶
func FindAndExtract ¶
func FindGenDeclByIdent ¶ added in v1.0.4
func FindGenDeclByName ¶
func GetAllPackageFiles ¶
func GetCommentsFromIdent ¶
func GetDefaultAlias ¶
func GetFieldMetadata ¶
func GetFieldTypeString ¶ added in v1.0.3
func GetFileByImportNode ¶
func GetFullPackageName ¶
func GetFuncReturnTypeList ¶
func GetNodeKind ¶ added in v1.0.3
func GetNodeKind(fieldType ast.Expr) definitions.AstNodeKind
func GetStructFromGenDecl ¶
func GetStructFromGenDecl(decl *ast.GenDecl) *ast.StructType
func GetTypeMetaByIdent ¶
func GetTypeMetaBySelectorExpr ¶
func GetTypeMetaBySelectorExpr( file *ast.File, fileSet *token.FileSet, packages []*packages.Package, selector *ast.SelectorExpr, ) (definitions.TypeMetadata, error)
func IsAliasDefault ¶
func IsPackageDotImported ¶
func IsUniverseType ¶
func LookupTypeName ¶ added in v1.0.3
func MapDocListToStrings ¶
MapDocListToStrings converts a list of comment nodes (ast.Comment) to a string array
func TryGetStructOrInterfaceKind ¶ added in v1.0.3
func TryGetStructOrInterfaceKind(pkg *packages.Package, name string) (definitions.AstNodeKind, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.