Documentation ¶
Index ¶
- Constants
- Variables
- func BuildLineOffsets(content []byte, onlyStatLineCount bool) (int, []int)
- func DotDotSlashes(count int) string
- func FindPackageCommonPrefixPaths(pa, pb string) string
- func Gen(intent, outputDir, lang string, args []string, options DocsGenerationOptions, ...)
- func GenDocs(outputDir string, args []string, lang string, options DocsGenerationOptions, ...)
- func GenTestData(outputDir string, args []string, silent bool, goldVersion string, ...)
- func ImprovePackagesForListing(pkgs []*PackageForListing)
- func NewHtmlPage(goldVersion, title string, theme Theme, translation Translation, ...) *htmlPage
- func PreviousVersion(version string) string
- func RelativePath(a, b string) string
- func Run(recommendedPort, lang string, args []string, silentMode bool, ...)
- func WriteHtmlEscapedBytes(w io.Writer, data []byte)
- type ChanCommOprator
- type Content
- type ContentPool
- type DocsGenerationOptions
- type ExportedType
- type FieldForListing
- type FileInfo
- type KeywordToken
- type LoadingLogMessage
- type MethodImplementationResult
- type MethodImplementations
- type MethodInfo
- type ObjectReferences
- type Overview
- type PackageDependencyInfo
- type PackageDetails
- type PackageForListing
- type ReferencesResult
- type SourceFileAnalyzeResult
- type TestData_Package
- type TestData_Type
- type Theme
- type Translation
- type TypeForListing
- type ValueForListing
Constants ¶
View Source
const ( UpdateTip_Nothing = iota UpdateTip_ToUpdate UpdateTip_Updating UpdateTip_Updated )
View Source
const ( ResTypeNone pageResType = "" ResTypeAPI pageResType = "api" ResTypeModule pageResType = "mod" ResTypePackage pageResType = "pkg" ResTypeDependency pageResType = "dep" ResTypeImplementation pageResType = "imp" ResTypeSource pageResType = "src" ResTypeReference pageResType = "use" ResTypeCSS pageResType = "css" ResTypeJS pageResType = "jvs" ResTypeSVG pageResType = "svg" ResTypePNG pageResType = "png" )
View Source
const ( DotMStyle_Unexported = -1 DotMStyle_NotShow = 0 DotMStyle_Exported = 1 )
View Source
const ( Phase_Unprepared = iota Phase_Analyzed )
View Source
const DurationToUpdate = time.Hour * 24 * 64
View Source
const Size = 1024 * 1024
Variables ¶
View Source
var ( BoldTagStart = []byte("<b>") BoldTagEnd = []byte("</b>") )
View Source
var (
StarSlash = []byte("*/")
)
View Source
var UpdateTip2DivID = []string{ UpdateTip_Nothing: "", UpdateTip_ToUpdate: "to-update", UpdateTip_Updating: "updating", UpdateTip_Updated: "updated", }
Functions ¶
func DotDotSlashes ¶
func GenDocs ¶
func GenDocs(outputDir string, args []string, lang string, options DocsGenerationOptions, goldVersion string, printUsage func(io.Writer), viewDocsCommand func(string) string)
nouses, plainsrc, silent, moregc bool
func GenTestData ¶
func ImprovePackagesForListing ¶
func ImprovePackagesForListing(pkgs []*PackageForListing)
func NewHtmlPage ¶
func NewHtmlPage(goldVersion, title string, theme Theme, translation Translation, currentPageInfo pagePathInfo) *htmlPage
func PreviousVersion ¶ added in v0.0.5
Return "" for invalid. Assume the digits of major/minor/patch are all from 0 to 9.
func RelativePath ¶
func WriteHtmlEscapedBytes ¶
Please make sure w.Write never makes errors.
Types ¶
type ChanCommOprator ¶
type ChanCommOprator struct {
// contains filtered or unexported fields
}
func (*ChanCommOprator) End ¶
func (ccp *ChanCommOprator) End() token.Pos
func (*ChanCommOprator) Pos ¶
func (ccp *ChanCommOprator) Pos() token.Pos
type Content ¶ added in v0.1.1
type Content [][]byte // all []byte with capacity Size
func (Content) DataLength ¶ added in v0.1.1
type ContentPool ¶ added in v0.1.1
type ContentPool struct {
// contains filtered or unexported fields
}
type DocsGenerationOptions ¶ added in v0.1.1
type ExportedType ¶
type ExportedType struct { TypeName *code.TypeName Fields []*code.Selector Methods []*code.Selector //ImplementedBys []*code.TypeInfo //Implements []code.Implementation ImplementedBys []TypeForListing Implements []TypeForListing // All are in the current package. // (Nearby packages should also be checked? Module scope is better!) //Values []code.ValueResource Values []ValueForListing // Including functions/methods, and variables. // At present, only the values in the current package will be collected. // (Nearby packages should also be checked.) // // For non-interface types, all functions are declared in the current package. // For interface types (except error), may include functions in outside packages. // ToDo: collect outside ones at analyzing phase, or at page generation phase. // Only the packages imported this package need to be checked. // Packages importing the packages containing any alias of this type // also need to be checked. (Also any types depending on this type?) //AsInputsOf []code.ValueResource //AsOutputsOf []code.ValueResource AsInputsOf []ValueForListing AsOutputsOf []ValueForListing Popularity int }
type FieldForListing ¶
type KeywordToken ¶
type KeywordToken struct {
// contains filtered or unexported fields
}
see https://groups.google.com/forum/#!topic/golang-tools/PaJBT2WjEPQ
func (*KeywordToken) End ¶
func (kw *KeywordToken) End() token.Pos
func (*KeywordToken) Pos ¶
func (kw *KeywordToken) Pos() token.Pos
type LoadingLogMessage ¶
type MethodImplementationResult ¶ added in v0.0.8
type MethodImplementations ¶ added in v0.0.8
type MethodImplementations struct { Method *code.Selector Implementations []MethodInfo }
type MethodInfo ¶ added in v0.0.8
type MethodInfo struct { Method *code.Selector Receiver *TypeForListing Explicit bool // whether or not the method is explicit Interface bool // whether or not the Owner is an interface type }
type ObjectReferences ¶ added in v0.1.0
type Overview ¶
type Overview struct { Packages []*PackageForListing code.Stats }
type PackageDependencyInfo ¶
type PackageDependencyInfo struct { Name string ImportPath string Index int Imports []*PackageForListing ImportedBys []*PackageForListing }
type PackageDetails ¶
type PackageDetails struct { Package *code.Package IsStandard bool Index int Name string ImportPath string Files []FileInfo ValueResources []code.ValueResource //ExportedTypeNames []*code.TypeName //UnexportedTypeNames []*code.TypeName ExportedTypeNames []*ExportedType // also including unexported ones when "show=all" query parameter is set. HasHiddenTypeNames bool NumDeps uint32 NumDepedBys uint32 }
type PackageForListing ¶
type PackageForListing struct { Package *code.Package Index int Mod *code.Module Name string Path string // blank for not analyzed yet Prefix string // the part shared with the last one in list Remaining string // the part different from the last one in list DepLevel int32 NumImportedBys int32 InWorkingDirectory bool }
type ReferencesResult ¶ added in v0.1.0
type SourceFileAnalyzeResult ¶
type TestData_Package ¶
type TestData_Package struct { Types map[string]TestData_Type VarNames []string ConstNames []string FuncNames []string }
type TestData_Type ¶
type Translation ¶
type Translation interface { Name() string LangTag() string // common Text_Space() string Text_Comma() string Text_Colon(tailSpace bool) string Text_Period(paragraphEnd bool) string Text_EnclosedInOarentheses(text string) string Text_PreferredFontList() string Text_BlankList() string // server Text_Server_Started() string // analyzing Text_Analyzing() string Text_AnalyzingRefresh(currentPageURL string) string // also used in other pages Text_Analyzing_Start() string Text_Analyzing_Done(d time.Duration, memoryUse string) string Text_Analyzing_PreparationDone(d time.Duration) string // ToDo: merge these into one? Text_Analyzing_NFilesParsed(numFiles int, d time.Duration) string Text_Analyzing_ParsePackagesDone(numFiles int, d time.Duration) string Text_Analyzing_CollectPackages(numPkgs int, d time.Duration) string Text_Analyzing_SortPackagesByDependencies(d time.Duration) string Text_Analyzing_CollectDeclarations(d time.Duration) string Text_Analyzing_CollectRuntimeFunctionPositions(d time.Duration) string Text_Analyzing_FindTypeSources(d time.Duration) string Text_Analyzing_CollectSelectors(d time.Duration) string Text_Analyzing_FindImplementations(d time.Duration) string Text_Analyzing_RegisterInterfaceMethodsForTypes(d time.Duration) string Text_Analyzing_MakeStatistics(d time.Duration) string Text_Analyzing_CollectSourceFiles(d time.Duration) string Text_Analyzing_CollectObjectReferences(d time.Duration) string Text_Analyzing_CacheSourceFiles(d time.Duration) string // overview page Text_Overview() string Text_PackageList() string Text_StatisticsWithMoreLink(detailedStatsLink string) string Text_SimpleStats(stats *code.Stats) string Text_Modules() string // to use Text_BelongingModule() string // to use Text_RequireStat(numRequires, numRequiredBys int) string // to use Text_UpdateTip(tipName string) string // tip names: "ToUpdate", "Updating", "Updated" Text_SortBy() string // also used in other pages Text_Filter() string // also used in other pages Text_SortByItem(by string) string // also used in other pages Text_FilterItem(fltr string) string // also used in other pages // package details page Text_Package(pkgPath string) string Text_BelongingPackage() string // also used in source code page Text_PackageDocsLinksOnOtherWebsites(pkgPath string, isStdPkg bool) string Text_ImportPath() string Text_ImportStat(numImports, numImportedBys int, depPageURL string) string Text_InvolvedFiles(num int) string Text_ExportedValues(num int) string Text_ExportedTypeNames(num int) string Text_AllPackageLevelTypeNames(num int) string Text_TypeNameListShowOption(exportedsOnly bool) string Text_Fields(num int, exportedsOnly bool) string // ToDo: merge these into one? Text_Methods(num int, exportedsOnly bool) string Text_ImplementedBy(num int) string Text_Implements(num int) string Text_AsOutputsOf(num int) string Text_AsInputsOf(num int) string Text_AsTypesOf(num int) string Text_References(num int) string // package dependencies page Text_DependencyRelations(pkgPath string) string // also used in package details page with a blank argument. Text_Imports() string Text_ImportedBy() string // method implementation page Text_MethodImplementations() string Text_NumMethodsImplementingNothing(count int) string // object references(uses) page Text_ReferenceList() string Text_ObjectKind(kind string) string Text_ObjectUses(num int) string // also used in other pages // source code page Text_SourceCode(pkgPath, bareFilename string) string Text_SourceFilePath() string Text_GeneratedFrom() string // statistics Text_Statistics() string Text_ChartTitle(chartName string) string Text_StatisticsTitle(titleName string) string Text_PackageStatistics(values map[string]interface{}) string Text_TypeStatistics(values map[string]interface{}) string Text_ValueStatistics(values map[string]interface{}) string Text_Othertatistics(values map[string]interface{}) string Text_GeneratedPageFooter(goldVersion, qrCodeLink, goOS, goArch string) string }
type TypeForListing ¶
type ValueForListing ¶
type ValueForListing struct { code.ValueResource InCurrentPkg bool CommonPath string }
Source Files ¶
- api_load.go
- api_update.go
- page.go
- page_css.go
- page_identifier-references.go
- page_javascript.go
- page_method-implementation.go
- page_module.go
- page_overview.go
- page_package-dependencies.go
- page_package-details.go
- page_png.go
- page_source-code.go
- page_statistics.go
- page_svg.go
- res.go
- server.go
- tool_gen-docs.go
- tool_gen-testdata.go
- tool_gen.go
Click to show internal directories.
Click to hide internal directories.