{{block "entirepage" . -}} {{if strings.HasPrefix .URL "/blog/"}} {{end}} {{if strings.HasPrefix .URL "/wiki/"}}Go Wiki: {{end}}{{.title}}{{if ne .URL "/"}} - The Go Programming Language{{end}} {{if .summary}} {{end}} {{if .link -}} {{end -}} {{$menus := data "/menus.yaml"}}
{{block "layout" .}}{{.Content}}{{end}}
{{end}} {{define "breadcrumbnav p1 p2"}} {{- if ne .p1.URL "/"}} {{- breadcrumbnav (page (path.Dir (strings.TrimRight .p1.URL "/"))) .p2}} {{- end}} {{- if not (eq .p1.title "The Go Programming Language")}} {{- end}} {{- end}} {{define "breadcrumbs"}} {{- end}} {{define "gopher info" -}} {{- with (yaml .info)}} {{- $src := "/images/gophers/wrench.svg"}} {{- $alt := "Go gophers with wrench"}} {{- $size := "Large"}} {{- $align := "Left"}} {{- $gopher := .color}} {{- $sizeIn := (or .size "")}} {{- if eq (.align) "right" "Right"}} {{- $align = "Right"}} {{- end}} {{- if eq $sizeIn "XLarge" "xl" "xlarge"}} {{- $size = "XLarge"}} {{- end}} {{- if eq $gopher "plane"}} {{- $src = "/images/gophers/biplane.svg"}} {{- $alt = "Go gopher in a plane"}} {{- end}} {{- if eq $gopher "blue"}} {{- $src = "/images/gophers/blue.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "front" "sticker1"}} {{- $src = "/images/gophers/front.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "graduate"}} {{- $src = "/images/gophers/graduate.svg"}} {{- $alt = "Go gopher graduating"}} {{- end}} {{- if eq $gopher "graduate-colorized"}} {{- $src = "/images/gophers/graduate-colorized.svg"}} {{- $alt = "Go gopher graduating"}} {{- end}} {{- if eq $gopher "green"}} {{- $src = "/images/gophers/green.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "grey" "gray"}} {{- $src = "/images/gophers/grey.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "happy" "sticker2"}} {{- $src = "/images/gophers/happy.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "headlamp"}} {{- $src = "/images/gophers/headlamp.svg"}} {{- $alt = "Go gopher with headlamp"}} {{- end}} {{- if eq $gopher "headlamp-colorized"}} {{- $src = "/images/gophers/headlamp-colorized.svg"}} {{- $alt = "Go gopher with headlamp"}} {{- end}} {{- if eq $gopher "ladder"}} {{- $src = "/images/gophers/ladder.svg"}} {{- $alt = "Go gopher with ladder"}} {{- end}} {{- if eq $gopher "machine"}} {{- $src = "/images/gophers/machine.svg"}} {{- $alt = "Go gophers with a machine"}} {{- end}} {{- if eq $gopher "machine-colorized"}} {{- $src = "/images/gophers/machine-colorized.svg"}} {{- $alt = "Go gopher with a machine"}} {{- end}} {{- if eq $gopher "megaphone"}} {{- $src = "/images/gophers/megaphone.svg"}} {{- $alt = "Go gopher with a megaphone"}} {{- end}} {{- if eq $gopher "peach"}} {{- $src = "/images/gophers/peach.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "pilot-bust"}} {{- $src = "/images/gophers/pilot-bust.svg"}} {{- $alt = "Go gopher pilot"}} {{- end}} {{- if eq $gopher "pink"}} {{- $src = "/images/gophers/pink.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "running"}} {{- $src = "/images/gophers/running.svg"}} {{- $alt = "Go gopher running"}} {{- end}} {{- if eq $gopher "slate"}} {{- $src = "/images/gophers/slate.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "wrench"}} {{- $src = "/images/gophers/wrench.svg"}} {{- $alt = "gopher with a wrench"}} {{- end}} {{- if eq $gopher "yellow"}} {{- $src = "/images/gophers/yellow.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "violet"}} {{- $src = "/images/gophers/violet.svg"}} {{- $alt = "Go gopher"}} {{- end}} {{- if eq $gopher "factory"}} {{- $src = "/images/gophers/factory.png"}} {{- $alt = "Go gopher factory"}} {{- end}} {{$alt}} {{- end}} {{- end}} {{define "pkg path name?" -}} {{or .name .path}} {{- end}} {{define "breadcrumb"}} {{$elems := strings.Split (strings.Trim . "/") "/"}} {{$prefix := slice $elems 0 (sub (len $elems) 1)}} {{range $i, $elem := $prefix -}} {{$elem}}/ {{- end -}} {{strings.Join (slice $elems (len $prefix) (len $elems)) "/"}} {{end}} {{define "doclayout"}} {{/* used from various subdirectory default.tmpl */}}
{{if .sidebar }}
{{end}} {{if .breadcrumb}} {{ breadcrumbs . }} {{end}} {{if .title}}

{{if strings.HasPrefix .URL "/wiki/"}}Go Wiki: {{end}}{{.title}}

{{else if eq .layout "error"}}

Error

{{else if eq .layout "dir"}}

Directory {{breadcrumb .URL}}

{{else if and (eq .layout "texthtml") (strings.HasSuffix .URL ".go")}}

Source file {{breadcrumb .URL}}

{{else if eq .layout "texthtml"}}

Text file {{breadcrumb .URL}}

{{end}} {{with .subtitle}}

{{.}}

{{end}} {{/* The Table of Contents is automatically inserted in this
. Do not delete this
. */}} {{if not .hidetoc}} {{end}} {{.Content}} {{if .sidebar }}
{{if eq .sidebar "faq"}} {{ faqsidebar .}} {{else if eq .sidebar "bug"}} {{ bugsidebar .}} {{end}}
{{end}} {{if strings.HasPrefix .URL "/wiki/"}}

This content is part of the Go Wiki.

{{end}}
{{end}} {{define "bugsidebar"}} {{end}} {{define "faqsidebar"}} {{end}}