Documentation ¶
Overview ¶
Package docs implements a Gondola application for browsing package documentation.
This application requires a Go source code checkout to be present on the server as well as GOROOT and GOPATH properly configured. Additionaly, a working Go installation is required to automatically download and update packages.
To configure the packages to list in the index, use the Groups variable.
This application can also automatically fetch and update the packages listed in the index. See StartUpdatingPackages and StopUpdatingPackages.
Index ¶
Constants ¶
const ( ListHandlerName = "docs-list" StdListHandlerName = "docs-std-list" PackageHandlerName = "docs-package" SourceHandlerName = "docs-source" )
Variables ¶
var ( PackageTemplateName = "package.html" PackagesTemplateName = "packages.html" SourceTemplateName = "source.html" ListHandler = app.NamedHandler(ListHandlerName, listHandler) StdListHandler = app.NamedHandler(StdListHandlerName, stdListHandler) PackageHandler = app.NamedHandler(PackageHandlerName, packageHandler) SourceHandler = app.NamedHandler(SourceHandlerName, sourceHandler) )
var (
App = app.New()
)
var (
DefaultContext = &doc.DefaultContext
)
var ( // Groups includes the packages to list in the package index. // See the Group struct for further information. Groups []*Group )
Functions ¶
func StartUpdatingPackages ¶
StartUpdatingPackages starts regularly updating the packages listed in Groups at the given interval. Note that for updating packages, the system should have installed the client for the SCM systems used by them (e.g. git, hg, etc...). A working Go installation on the host is also required, since go get will be used to download them.
func StopUpdatingPackages ¶
func StopUpdatingPackages()
StopUpdatingPackages stops updating packages. Note that an in-flight update won't be stopped, but no more updates will be scheduled.