Documentation
¶
Overview ¶
Package server implements the Go documentation server.
Index ¶
- Variables
- type Config
- type LoadMode
- type Package
- func (pkg *Package) AllExamples() []*texample
- func (pkg *Package) Breadcrumbs(templateName string) htemp.HTML
- func (pkg *Package) Cgo() bool
- func (pkg *Package) IsCommand() bool
- func (pkg *Package) ObjExamples(obj interface{}) []*texample
- func (pkg *Package) PackageExamples() []*texample
- func (pkg *Package) PageName() string
- func (pkg *Package) PlatformParam() string
- func (pkg *Package) SourceLink(pos doc.Pos, text string, textOnlyOK bool) htemp.HTML
- func (pkg *Package) VersionParam() string
- func (pkg *Package) View(view string) string
- type Server
- type TemplateMap
- func (m TemplateMap) Execute(w io.Writer, name string, data interface{}) error
- func (m TemplateMap) ExecuteHTML(resp http.ResponseWriter, name string, status int, data interface{}) error
- func (m TemplateMap) ExecuteHTTP(resp http.ResponseWriter, name string, status int, data interface{}) error
- func (m TemplateMap) ParseHTML(name string, funcs htemp.FuncMap, fs fs.FS, files ...string) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PackagePrefix string
Fallback string
BrandName string
AdminName string
AdminEmail string
WebsiteIssues string
BindHTTP string
GoModCache string
UserAgent string
Platform string
RequestTimeout time.Duration
MaxAge time.Duration
AssetsFS fs.FS
TemplatesFS fs.FS
Index string
}
Server configuration.
type LoadMode ¶
type LoadMode int
A LoadMode configures the amount of detail returned when loading a package.
type Package ¶
type Package struct {
internal.Package
doc.Documentation
Project *meta.Project
Platform string
Dir string
Imported []internal.Package
SubPackages []internal.Package
Message string
// contains filtered or unexported fields
}
Package contains package information and documentation for use in templates.
func (*Package) AllExamples ¶
func (pkg *Package) AllExamples() []*texample
func (*Package) ObjExamples ¶
func (pkg *Package) ObjExamples(obj interface{}) []*texample
func (*Package) PackageExamples ¶
func (pkg *Package) PackageExamples() []*texample
func (*Package) PlatformParam ¶
func (*Package) SourceLink ¶
func (*Package) VersionParam ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
The Go documentation server.
type TemplateMap ¶
func (TemplateMap) Execute ¶
func (m TemplateMap) Execute(w io.Writer, name string, data interface{}) error
func (TemplateMap) ExecuteHTML ¶
func (m TemplateMap) ExecuteHTML(resp http.ResponseWriter, name string, status int, data interface{}) error
func (TemplateMap) ExecuteHTTP ¶
func (m TemplateMap) ExecuteHTTP(resp http.ResponseWriter, name string, status int, data interface{}) error
Click to show internal directories.
Click to hide internal directories.