Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(535)

Delta Between Two Patch Sets: src/cmd/godoc/godoc.go

Issue 5865056: code review 5865056: godoc: use shorter titles for tabs (Closed)
Left Patch Set: diff -r 509fce3ba4e1 https://code.google.com/p/go Created 13 years ago
Right Patch Set: diff -r 74edd315eec5 https://code.google.com/p/go Created 13 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/godoc/codewalk.go ('k') | src/cmd/godoc/main.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "encoding/json" 9 "encoding/json"
10 "flag" 10 "flag"
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 title = "Command " + tabtitle 1096 title = "Command " + tabtitle
1097 } 1097 }
1098 default: 1098 default:
1099 tabtitle = info.Dirname 1099 tabtitle = info.Dirname
1100 title = "Directory " + tabtitle 1100 title = "Directory " + tabtitle
1101 if *showTimestamps { 1101 if *showTimestamps {
1102 subtitle = "Last update: " + info.DirTime.String() 1102 subtitle = "Last update: " + info.DirTime.String()
1103 } 1103 }
1104 } 1104 }
1105 1105
1106 // special cases for top-level package/command directories
1107 switch tabtitle {
1108 case "/src/pkg":
1109 tabtitle = "Packages"
1110 case "/src/cmd":
1111 tabtitle = "Commands"
1112 }
1113
1106 contents := applyTemplate(packageHTML, "packageHTML", info) 1114 contents := applyTemplate(packageHTML, "packageHTML", info)
1107 servePage(w, tabtitle, title, subtitle, "", contents) 1115 servePage(w, tabtitle, title, subtitle, "", contents)
1108 } 1116 }
1109 1117
1110 // ---------------------------------------------------------------------------- 1118 // ----------------------------------------------------------------------------
1111 // Search 1119 // Search
1112 1120
1113 var searchIndex RWValue 1121 var searchIndex RWValue
1114 1122
1115 type SearchResult struct { 1123 type SearchResult struct {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 updateIndex() 1423 updateIndex()
1416 } 1424 }
1417 delay := 60 * time.Second // by default, try every 60s 1425 delay := 60 * time.Second // by default, try every 60s
1418 if *testDir != "" { 1426 if *testDir != "" {
1419 // in test mode, try once a second for fast startup 1427 // in test mode, try once a second for fast startup
1420 delay = 1 * time.Second 1428 delay = 1 * time.Second
1421 } 1429 }
1422 time.Sleep(delay) 1430 time.Sleep(delay)
1423 } 1431 }
1424 } 1432 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b