aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/rpc/debug.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 15:47:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 15:47:21 +0000
commitadb0401dac41c81571722312d4586b2693f95aa6 (patch)
treeea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/rpc/debug.go
parent5548ca3540bccbc908a45942896d635ea5f1c23f (diff)
downloadgcc-adb0401dac41c81571722312d4586b2693f95aa6.zip
gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.gz
gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.bz2
Update Go library to r60.
From-SVN: r178910
Diffstat (limited to 'libgo/go/rpc/debug.go')
-rw-r--r--libgo/go/rpc/debug.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/libgo/go/rpc/debug.go b/libgo/go/rpc/debug.go
index 32dc8a1..7e3e6f6 100644
--- a/libgo/go/rpc/debug.go
+++ b/libgo/go/rpc/debug.go
@@ -19,24 +19,24 @@ import (
const debugText = `<html>
<body>
<title>Services</title>
- {.repeated section @}
+ {{range .}}
<hr>
- Service {Name}
+ Service {{.Name}}
<hr>
<table>
<th align=center>Method</th><th align=center>Calls</th>
- {.repeated section Method}
+ {{range .Method}}
<tr>
- <td align=left font=fixed>{Name}({Type.ArgType}, {Type.ReplyType}) os.Error</td>
- <td align=center>{Type.NumCalls}</td>
+ <td align=left font=fixed>{{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) os.Error</td>
+ <td align=center>{{.Type.NumCalls}}</td>
</tr>
- {.end}
+ {{end}}
</table>
- {.end}
+ {{end}}
</body>
</html>`
-var debug = template.MustParse(debugText, nil)
+var debug = template.Must(template.New("RPC debug").Parse(debugText))
type debugMethod struct {
Type *methodType
@@ -70,7 +70,7 @@ func (server debugHTTP) ServeHTTP(w http.ResponseWriter, req *http.Request) {
// Build a sorted version of the data.
var services = make(serviceArray, len(server.serviceMap))
i := 0
- server.Lock()
+ server.mu.Lock()
for sname, service := range server.serviceMap {
services[i] = debugService{service, sname, make(methodArray, len(service.method))}
j := 0
@@ -81,7 +81,7 @@ func (server debugHTTP) ServeHTTP(w http.ResponseWriter, req *http.Request) {
sort.Sort(services[i].Method)
i++
}
- server.Unlock()
+ server.mu.Unlock()
sort.Sort(services)
err := debug.Execute(w, services)
if err != nil {