Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package dochtml

import (
	
	

	
	
	
	
)

var (
	loadOnce sync.Once
TODO(golang.org/issue/5060): finalize URL scheme and design for notes, then it becomes more viable to factor out inline CSS style.
LoadTemplates reads and parses the templates used to generate documentation.
func ( template.TrustedSource) {
	loadOnce.Do(func() {
		 := template.TrustedSourceJoin
		 := template.TrustedSourceFromConstant
		bodyTemplate = template.Must(template.New("body.tmpl").
			Funcs(tmpl).
			ParseFilesFromTrustedSources(
				(, ("body.tmpl")),
				(, ("declaration.tmpl")),
				(, ("example.tmpl"))))
		outlineTemplate = template.Must(template.New("outline.tmpl").
			Funcs(tmpl).
			ParseFilesFromTrustedSources((, ("outline.tmpl"))))
		sidenavTemplate = template.Must(template.New("sidenav-mobile.tmpl").
			Funcs(tmpl).
			ParseFilesFromTrustedSources((, ("sidenav-mobile.tmpl"))))
	})
}

var tmpl = map[string]interface{}{
	"ternary": func(, ,  interface{}) interface{} {
		 := reflect.ValueOf()
		 := reflect.New(.Type()).Elem()
		if reflect.DeepEqual(.Interface(), .Interface()) {
			return 
		}
		return 
	},
	"render_short_synopsis":    (*render.Renderer)(nil).ShortSynopsis,
	"render_synopsis":          (*render.Renderer)(nil).Synopsis,
	"render_doc":               (*render.Renderer)(nil).DocHTML,
	"render_doc_extract_links": (*render.Renderer)(nil).DocHTML,
	"render_decl":              (*render.Renderer)(nil).DeclHTML,
	"render_code":              (*render.Renderer)(nil).CodeHTML,
	"file_link":                func() string { return "" },
	"source_link":              func(string, interface{}) string { return "" },
	"since_version":            func(string) safehtml.HTML { return safehtml.HTML{} },
	"play_url":                 func(*doc.Example) string { return "" },
	"safe_id":                  render.SafeGoID,