~emersion/gyosu

872488ff784e0ef4d71258400c28624b4a7e8d1d — Simon Ser 9 days ago 074d911
Remove unnecessary shadowed variables
1 files changed, 11 insertions(+), 15 deletions(-)

M main.go
M main.go => main.go +11 -15
@@ 573,22 573,18 @@ func main() {
			return data.Decls[i].Name < data.Decls[j].Name
		})

		symHref := func(kind declKind, name string) string {
			target := symHref(declMap, kind, name)
			if target == "" {
				return ""
			}
			return relPath(basePath, target)
		}

		unitHref := func(name string) string {
			target := unitHref(name)
			return relPath(basePath, target)
		}

		tpl.Funcs(template.FuncMap{
			"symhref":  symHref,
			"unithref": unitHref,
			"symhref": func(kind declKind, name string) string {
				target := symHref(declMap, kind, name)
				if target == "" {
					return ""
				}
				return relPath(basePath, target)
			},
			"unithref": func(name string) string {
				target := unitHref(name)
				return relPath(basePath, target)
			},
		})

		outputFilename := filepath.Join(outputDir, filename+".html")