Source File
breadcrumb.go
Belonging Package
golang.org/x/pkgsite/internal/frontend
package frontend
import (
)
func ( *internal.UnitMeta, string) breadcrumb {
:= breadcrumbPath(.Path, .ModulePath, )
if .ModulePath == stdlib.ModulePath && .Path != stdlib.ModulePath {
.Links = append([]link{{Href: "/std", Body: "Standard library"}}, .Links...)
}
.Links = append([]link{{Href: "/", Body: "Discover Packages"}}, .Links...)
return
}
type breadcrumb struct {
Links []link
Current string
CopyData string
}
type link struct {
Href, Body string
}
func (, , string) breadcrumb {
if == stdlib.ModulePath {
return breadcrumb{Current: "Standard library"}
.CopyData =
return
![]() |
The pages are generated with Golds v0.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. |