]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: support flat directory view again
authorAndrew Gerrand <adg@golang.org>
Tue, 21 Feb 2012 22:25:56 +0000 (09:25 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 21 Feb 2012 22:25:56 +0000 (09:25 +1100)
R=bradfitz
CC=golang-dev
https://golang.org/cl/5690058

lib/godoc/package.html

index 841ad8df0fd92f29288e2ed3cbefeaac454f046b..01043b05f29911961f1d736bbb67e8f14ff0375c 100644 (file)
        {{range .List}}
        <tr>
                <td>
-               {{repeat `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` .Depth}}<a href="{{html .Path}}">{{html .Name}}</a>
+               {{if $.DirFlat}}
+                       <a href="{{html .Path}}">{{html .Path}}</a>
+               {{else}}
+                       {{repeat `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;` .Depth}}<a href="{{html .Path}}">{{html .Name}}</a>
+               {{end}}
                </td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td style="width: auto">{{html .Synopsis}}</td>