Involved Source Files
Package pagecheck implements HTML checkers for discovery site pages.
It uses the general-purpose checkers in internal/testing/htmlcheck to define
site-specific checkers.
Package-Level Type Names (only one, which is exported)
/* sort exporteds by: | */
Page describes a discovery site web page for a package, module or directory.
CommitTime is the output of frontend.absoluteTime for the commit time.
FormattedVersion is the version of the module, or go tag if it is the
stdlib. The version string may be truncated if it is a pseudoversion.
IsLatestMajor is the latest major version of this series.
IsLatestMinor is the latest minor version of this module.
LatestLink is the href of "Go to latest" link.
LatestMajorVersion is the suffix of the latest major version, empty if
v0 or v1.
LatestMajorVersionLink is the link to the latest major version of the
unit. If the unit does not exist at the latest major version, it is a
link to the latest major version of the module.
LicenseFilePath is the path of the license relative to the module directory.
LicenseType is name of the license.
MissingInMinor says that the unit is missing in the latest minor version of this module.
ModulePath is the module path for the unit page.
ModuleURL is the relative module URL.
Suffix is the unit path element after module path; empty for a module
Title is output of frontend.pageTitle.
UnitURLFormat is the relative unit URL, with one %s for "@version".
Version is the full version of the module, or the go tag if it is the
stdlib.
func UnitHeader(p *Page, versionedURL bool, isPackage bool) htmlcheck.Checker
func unitURLPath(p *Page, versioned bool) string
func versionBadge(p *Page) htmlcheck.Checker
Package-Level Functions (total 9, in which 7 are exported)
CanonicalURLPath checks the canonical url for the unit on the page.
LicenseDetails checks the details section of a license tab.
SubdirectoriesDetails checks the detail section of a subdirectories tab.
If firstHref isn't empty, it and firstText should exactly match
href and text of the first link in the Directories table.
UnitDirectories checks the directories section of the main page.
If firstHref isn't empty, it and firstText should exactly match
href and text of the first link in the Directories table.
UnitDoc checks the doc section of the main page.
UnitHeader checks a main page header for a unit.
UnitReadme checks the readme section of the main page.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.