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, silent bool, goldVersion string, ...)
- func GenDocs(outputDir string, args []string, lang string, silent bool, goldVersion string, ...)
- func GenTestData(outputDir string, args []string, silent bool, goldVersion string, ...)
- func ImprovePackagesForListing(pkgs []*PackageForListing)
- func NewHtmlPage(goldVersion, title, themeName string, currentPageInfo pagePathInfo) *htmlPage
- func RelativePath(a, b string) string
- func Run(port string, args []string, silentMode bool, goldVersion string, ...)
- func WriteHtmlEscapedBytes(w io.Writer, data []byte)
- type ChanCommOprator
- type ExportedType
- type FieldForListing
- type FileInfo
- type KeywordToken
- type LoadingLogMessage
- type Overview
- type PackageDependencyInfo
- type PackageDetails
- type PackageForListing
- 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" ResTypePackage pageResType = "pkg" ResTypeDependency pageResType = "dep" ResTypeSource pageResType = "src" ResTypeCSS pageResType = "css" ResTypeJS pageResType = "jvs" ResTypeSVG pageResType = "svg" )
View Source
const ( Phase_Unprepared = iota Phase_Analyzed )
View Source
const DurationToUpdate = time.Hour * 24 * 32
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 GenTestData ¶
func ImprovePackagesForListing ¶
func ImprovePackagesForListing(pkgs []*PackageForListing)
func NewHtmlPage ¶
func NewHtmlPage(goldVersion, title, themeName string, currentPageInfo pagePathInfo) *htmlPage
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 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 }
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 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 NumDeps uint32 NumDepedBys uint32 }
type PackageForListing ¶
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 // analyzing Text_Analyzing() string Text_AnalyzingRefresh(currentPageURL string) string // also used in other pages Text_Analyzing_Start() string Text_Analyzing_PreparationDone(d time.Duration) string 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_Done(d time.Duration, memoryUse string) string // overview page Text_Overview() string Text_PackageList() string Text_Statistics() 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" // 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_UnexportedTypeNames(num int) string // to use Text_Fields(num int) string Text_Methods(num int) 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 // source code page Text_SourceCode(pkgPath, bareFilename string) string Text_SourceFilePath() string Text_GeneratedFrom() string // server Text_Server_Started() string }
type TypeForListing ¶
type ValueForListing ¶
type ValueForListing struct { code.ValueResource InCurrentPkg bool CommonPath string }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.