pkgsite: Index | Files

package pagecheck

import ""

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 Files


func DirectoryHeader Uses

func DirectoryHeader(p *Page, versionedURL bool) htmlcheck.Checker

DirectoryHeader checks a details page header for a directory.

func LicenseDetails Uses

func LicenseDetails(ltype, bodySubstring, source string) htmlcheck.Checker

LicenseDetails checks the details section of a license tab.

func ModuleHeader Uses

func ModuleHeader(p *Page, versionedURL bool) htmlcheck.Checker

ModuleHeader checks a details page header for a module.

func OverviewDetails Uses

func OverviewDetails(ov *Overview) htmlcheck.Checker

OverviewDetails checks the details section of an overview tab.

func PackageHeader Uses

func PackageHeader(p *Page, versionedURL bool) htmlcheck.Checker

PackageHeader checks a details page header for a package.

func SubdirectoriesDetails Uses

func SubdirectoriesDetails(firstHref, firstText string) htmlcheck.Checker

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.

type Overview Uses

type Overview struct {
    ModuleLink     string // relative link to module page
    ModuleLinkText string
    RepoURL        string
    PackageURL     string
    ReadmeContent  string
    ReadmeSource   string

Overview describes the contents of the overview tab.

type Page Uses

type Page struct {
    ModulePath       string
    Suffix           string // package or directory path after module path; empty for a module
    Version          string
    FormattedVersion string
    Title            string
    LicenseType      string
    LicenseFilePath  string
    IsLatest         bool   // is this the latest version of this module?
    LatestLink       string // href of "Go to latest" link
    PackageURLFormat string // the relative package URL, with one %s for "@version"; also used for dirs
    ModuleURL        string // the relative module URL

Page describes a discovery site web page for a package, module or directory.

Package pagecheck imports 5 packages (graph). Updated 2020-08-05. Refresh now. Tools for package owners.