From 0eb4df0bc8e32fe68d7954055ee36e24e33dc15e Mon Sep 17 00:00:00 2001 From: Ugorji Nwoke Date: Mon, 5 Mar 2012 15:36:33 -0500 Subject: [PATCH] cmd/godoc: remove extra / in paths If I click on links which should send you to source code (e.g. type, function, etc), the link is to //src/... (instead of /src/...). This causes a DNS resolution failure on the browser. Quick fix is to remove the leading / from package.html (since godoc.go src links automatically add a leading / as necessary). Fixes #3193. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5730059 --- lib/godoc/package.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/godoc/package.html b/lib/godoc/package.html index c326e34cfc..e46300f6b6 100644 --- a/lib/godoc/package.html +++ b/lib/godoc/package.html @@ -93,7 +93,7 @@ {{range .Funcs}} {{/* Name is a string - no need for FSet */}} {{$name_html := html .Name}} -

func {{$name_html}}

+

func {{$name_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{example_html .Name $.Examples $.FSet}} @@ -101,7 +101,7 @@ {{range .Types}} {{$tname := .Name}} {{$tname_html := html .Name}} -

type {{$tname_html}}

+

type {{$tname_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} @@ -119,7 +119,7 @@ {{range .Funcs}} {{$name_html := html .Name}} -

func {{$name_html}}

+

func {{$name_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{example_html .Name $.Examples $.FSet}} @@ -127,7 +127,7 @@ {{range .Methods}} {{$name_html := html .Name}} -

func ({{html .Recv}}) {{$name_html}}

+

func ({{html .Recv}}) {{$name_html}}

{{node_html .Decl $.FSet}}
{{comment_html .Doc}} {{$name := printf "%s_%s" $tname .Name}} -- 2.50.0