Documentation ¶
Index ¶
- Constants
- func AstFuncString(fc *ast.FuncType, pkgName, fcName string) string
- func AstValueSpecString(spec ast.Spec, sep string) string
- func DepString(a, b, indent string, kind DepKind) string
- func DocFuncString(fc *doc.Func, pkgName string) string
- func DocFuncsStrings(fcs []*doc.Func, indent, pkgName string) string
- func DocGlobalScopeString(cons []*doc.Value, vrs []*doc.Value, fcs []*doc.Func, ...) string
- func DocTypeString(dtyp *doc.Type, indentHead string, PkgNumberName string) string
- func DocValuesStrings(values []*doc.Value, indent, sep string) string
- func EscapeString(text string) string
- func InterfaceFieldsStrings(ityp *ast.InterfaceType, indent string) (supers, methods []string)
- func SelectorTail(PkgNumberName string) string
- func StructFieldsStrings(styp *ast.StructType, indent string) (supers, fields []string)
- type DepKind
- type DepPackage
- type DepSpec
- type InterfaceSpec
- type Portrait
Constants ¶
View Source
const ( Main = "main" ClassModifier = "class" InterfaceModifier = "interface" PublicModifier = "+" PrivateModifier = "-" StaticModifier = "{static}" FieldModifier = "{field}" MethodModifier = "{method}" PrototypeArea = "..prototype.." ConstArea = "..const.." VarArea = "..var.." FuncArea = "..func.." FieldArea = "..field.." MethodArea = "..method.." SupperArea = "..supper.." ConstructorArea = "..constructor.." ScopeArea = "==scope==" SPkgHeader = "package %s {" )
Variables ¶
This section is empty.
Functions ¶
func DocGlobalScopeString ¶
func DocTypeString ¶
func EscapeString ¶
func InterfaceFieldsStrings ¶
func InterfaceFieldsStrings(ityp *ast.InterfaceType, indent string) (supers, methods []string)
func SelectorTail ¶
func StructFieldsStrings ¶
func StructFieldsStrings(styp *ast.StructType, indent string) (supers, fields []string)
Types ¶
type DepPackage ¶
type DepPackage struct { Dir string Pkg *doc.Package // 包 Scope map[string]*ast.Object // 包域环境值 DepsMap map[string][]*DepSpec // 类的依赖列表 }
func (*DepPackage) AddDepSpec ¶
func (d *DepPackage) AddDepSpec(name string, depSpec *DepSpec)
type Portrait ¶
type Portrait struct { Rootdir string Excldirs []string DepPkgs []*DepPackage DirPkgMap map[string]*DepPackage DirsMap map[string][]string InterfaceList []InterfaceSpec NoScope []string NoBuild []string Puml string // contains filtered or unexported fields }
func NewPortrait ¶
func (*Portrait) ClassUniqueName ¶
ClassUniqueName - 生成含固定唯一包前缀的类名,若不指定dir将跳过包名生成逻辑
func (*Portrait) IndentWithPreDirs ¶
IndentWithPreDirs - 基于当前DepPkg的索引计算缩进和父路径列表
func (*Portrait) PkgUniqueName ¶
PkgUniqueName - 生成包的固定唯一名,解决多个同名包问题
Click to show internal directories.
Click to hide internal directories.